Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 3dd8bca5a331f46a5ba1cbec6d91c01d > files > 43

systemd-217-11.2.mga5.src.rpm

%define libsystemd_major 0
%define libudev_major 1
%define libgudev_api 1.0
%define libgudev_major 0

%define libname %mklibname %{name} %{libsystemd_major}

%define libdaemon %mklibname systemd-daemon 0
%define libjournal %mklibname systemd-journal 0
%define liblogin %mklibname systemd-login 0
%define libid128 %mklibname systemd-id 128 0

%define libudev %mklibname udev %{libudev_major}
%define libudev_devel %mklibname -d udev

%define libgudev %mklibname gudev %{libgudev_api} %{libgudev_major}
%define libgudev_devel %mklibname -d gudev %{libgudev_api}
%define libgudev_gir %mklibname gudev-gir %{libgudev_api}

Summary:	A System and Session Manager
Name:		systemd
Version:	217
%define subrel	2
Release:	%mkrel 11
License:	GPLv2+
Group:		System/Boot and Init
Url:		http://www.freedesktop.org/wiki/Software/systemd
Source0:	http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz

Source10: 50-udev-mageia.rules
Source11: 69-printeracl.rules
# (hk) udev rules for zte 3g modems with drakx-net
Source12: 61-mobile-zte-drakx-net.rules

# (blino) net rules and helpers
Source20: 81-net.rules
Source21: udev_net_create_ifcfg
Source22: udev_net_action
Source23: udev_net.sysconfig

# (cg) Upstream cherry picks
# (not technically upstream yet, but confident it will be...)
Patch100: 0100-sysusers-Preserve-ownership-and-mode-on-etc-passwd-a.patch
Patch101: 0101-nspawn-ignore-EEXIST-when-creating-mount-point.patch
Patch102: 0102-manager-Ensure-user-s-systemd-runtime-directory-exis.patch
Patch103: 0103-keymap-Ignore-brightness-keys-on-Dell-Inspiron-1520-.patch
Patch104: 0104-shared-install-avoid-prematurely-rejecting-missing-u.patch
Patch105: 0105-units-don-t-order-journal-flushing-afte-remote-fs.ta.patch
Patch106: 0106-units-order-sd-journal-flush-after-sd-remount-fs.patch
Patch107: 0107-units-make-systemd-journald.service-Type-notify.patch
Patch108: 0108-udev-hwdb-Change-error-message-regarding-missing-hwd.patch
Patch109: 0109-shutdown-fix-arguments-to-run-initramfs-shutdown.patch
Patch110: 0110-systemctl-when-invokes-as-reboot-f-sync.patch
Patch111: 0111-login-rerun-vconsole-setup-when-switching-from-vgaco.patch
Patch112: 0112-build-sys-configure-the-list-of-system-users-files-a.patch
Patch113: 0113-cgroup-Handle-error-when-destroying-cgroup.patch
Patch114: 0114-journal-call-connect-with-dropped-privileges.patch
Patch115: 0115-logind-fix-sd_eviocrevoke-ioctl-call.patch
Patch116: 0116-backport-udev-downgrade-a-few-warnings-to-debug-messages.patch
Patch117: 0117-everywhere-remove-configurability-of-sysv-runlevel-to-target-mapping.patch
# (doktor5000) backported from 221, supposedly fixes mga#16396
# see http://cgit.freedesktop.org/systemd/systemd/commit/?id=41dfeaa194c18de49706b5cecf4e53accd12b7f6 for details
Patch118: 41dfeaa194c18de49706b5cecf4e53accd12b7f6.patch
Patch119: 0119-manager-Fix-zero-length-notify-message.patch

# (cg/bor) clean up directories on boot as done by rc.sysinit
# - Lennart should be poked about this (he couldn't think why he hadn't done it already)
Patch500: 0500-Clean-directories-that-were-cleaned-up-by-rc.sysinit.patch
Patch501: 0501-main-Add-failsafe-to-the-sysvinit-compat-cmdline-key.patch
Patch502: 0502-mageia-Fallback-message-when-display-manager-fails.patch
Patch503: 0503-Disable-modprobe-pci-devices-on-coldplug-for-storage.patch
Patch504: 0504-Allow-booting-from-live-cd-in-virtualbox.patch
Patch505: 0505-reinstate-TIMEOUT-handling.patch
Patch506: 0506-udev-Allow-the-udevadm-settle-timeout-to-be-set-via-.patch
Patch507: 0507-Mageia-Relax-perms-on-sys-kernel-debug-for-lspcidrak.patch
Patch508: 0508-udev-rules-Apply-SuSE-patch-to-restore-cdrom-cdrw-dv.patch
Patch509: 0509-pam_systemd-Always-reset-XDG_RUNTIME_DIR.patch
Patch510: 0510-pam-Suppress-errors-in-the-SuSE-patch-to-unset-XDG_R.patch
Patch511: 0511-Revert-systemctl-skip-native-unit-file-handling-if-s.patch
Patch512: 0512-systemctl-Do-not-attempt-native-calls-for-enable-dis.patch
Patch513: 0513-systemctl-Ensure-the-no-reload-and-no-redirect-optio.patch
Patch514: 0514-Revert-udev-hwdb-Support-shipping-pre-compiled-datab.patch
Patch515: 0515-Add-path-to-locale-search.patch
Patch516: 0516-Fix-mtd_probe-build.patch

BuildRequires:	dbus-devel >= 1.4.0
BuildRequires:	libcap-devel
BuildRequires:	tcp_wrappers-devel
BuildRequires:	pam-devel
BuildRequires:	dbus-glib-devel
BuildRequires:	vala >= 0.9
BuildRequires:	glib2-devel
BuildRequires:	libnotify-devel
BuildRequires:	intltool
BuildRequires:	gettext-devel
BuildRequires:	gperf
BuildRequires:	pkgconfig(gee-1.0)
BuildRequires:	cryptsetup-devel
BuildRequires:	pkgconfig(libkmod)
BuildRequires:	pkgconfig(blkid)
BuildRequires:	pkgconfig(gobject-introspection-1.0)
BuildRequires:	xsltproc
BuildRequires:	docbook-style-xsl
BuildRequires:	python-devel
BuildRequires:	pkgconfig(libmicrohttpd)
BuildRequires:	pkgconfig(liblzma)
BuildRequires:	pkgconfig(libidn)
BuildRequires:	pkgconfig(libcurl)
BuildRequires:	pkgconfig(python)
BuildRequires:	python-lxml
# (cg) don't add more deps for now but add this when cauldron reopens.
#BuildRequires:	pkgconfig(libqrencode)
Requires(pre):	filesystem >= 2.1.9-18
Requires(pre):	shadow-utils
Requires:	systemd-units = %{version}-%{release}
Requires:	dbus >= 1.3.2
Requires:	initscripts >= 9.21-3
Requires:	util-linux-ng >= 2.18
Requires:	nss-myhostname
Requires:	lockdev
Conflicts:	initscripts < 9.25
Provides:	should-restart = system
Provides: udev = %{version}-%{release}
Obsoletes: udev < 185
Provides:  systemd-sysvinit = %{version}-%{release}
Conflicts: systemd-sysvinit < 185
Obsoletes: systemd-sysvinit < 185
Provides:  sysvinit = 2.87-22
Obsoletes: sysvinit < 2.87-22
Conflicts: SysVinit
# Due to halt/poweroff etc. in _bindir
Conflicts: usermode-consoleonly < 1:1.110
Provides:  system-logger
# (blino) consolekit has been replaced by systemd-logind
Obsoletes: consolekit
Obsoletes: consolekit-x11
Obsoletes: libconsolekit0
Obsoletes: lib64consolekit0
Obsoletes: systemd-tools
Obsoletes: bootchart
Obsoletes: bootchart-daemon

%description
systemd is a system and session manager for Linux, compatible with
SysV and LSB init scripts. systemd provides aggressive parallelization
capabilities, uses socket and D-Bus activation for starting services,
offers on-demand starting of daemons, keeps track of processes using
Linux cgroups, supports snapshotting and restoring of the system
state, maintains mount and automount points and implements an
elaborate transactional dependency-based service control logic. It can
work as a drop-in replacement for sysvinit.

%package units
Summary:	Configuration files, directories and installation tool for systemd
Group:		System/Boot and Init
Requires(pre):	filesystem >= 2.1.9-18
Requires:	%{name} = %{version}-%{release}
Requires:	chkconfig > 1.3.61-2
Conflicts:	%{name} <= 216-10
Conflicts:	initscripts < 9.25
Requires(post): coreutils grep awk

%description units
Basic configuration files, directories and installation tool for the systemd
system and session manager.

%package -n python-%{name}
Summary:	Python bindings for %{name}
Group:		Development/Python

%description -n python-%{name}
Python bindings for %{name}

%package devel
Summary:       Systemd development files
Group:         Development/C
Conflicts:     %{name} <= 35-4
Requires:      %{libname} = %{version}-%{release}
#Obsoletes:     %{libdaemon}
#Obsoletes:     %{liblogin}
#Obsoletes:     %{libid128}
#Obsoletes:     %{libjournal}
# (cg) Obsolete the old, versioned/split devel packages
Provides:      libsystemd-daemon-devel = %{version}-%{release}
Provides:      %{mklibname -d systemd-daemon 0} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-daemon 0} < 185
Provides:      %{mklibname -d systemd-daemon} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-daemon} < 186
Provides:      libsystemd-login-devel = %{version}-%{release}
Provides:      %{mklibname -d systemd-login 0} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-login 0} < 185
Provides:      %{mklibname -d systemd-login} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-login} < 186
Provides:      libsystemd-journal-devel = %{version}-%{release}
Provides:      %{mklibname -d systemd-journal 0} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-journal 0} < 185
Provides:      %{mklibname -d systemd-journal} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-journal} < 186
Provides:      libsystemd-id128-devel = %{version}-%{release}
Provides:      %{mklibname -d systemd-id128 0} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-id128 0} < 185
Provides:      %{mklibname -d systemd-id128} = %{version}-%{release}
Obsoletes:     %{mklibname -d systemd-id128} < 186
# (cg) Provide old autogenerated names until other devel packages are rebuilt
%ifarch x86_64
Provides: devel(libsystemd-id128(64bit))
Provides: devel(libsystemd-journal(64bit))
Provides: devel(libsystemd-login(64bit))
Provides: devel(libsystemd-daemon(64bit))
%else
Provides: devel(libsystemd-id128)
Provides: devel(libsystemd-journal)
Provides: devel(libsystemd-login)
Provides: devel(libsystemd-daemon)
%endif

%description devel
This package provides the development files for systemd.

%package -n nss-myhostname
Summary:	systemd provided glibc plugin for local system host name resolution
Group:		System/Base

%description -n nss-myhostname
nss-myhostname is a plugin for the GNU Name Service Switch (NSS)
functionality of the GNU C Library (glibc) providing host name
resolution for the locally configured system hostname as returned by
gethostname(2). Various software relies on an always resolvable local
host name. When using dynamic hostnames this is usually achieved by
patching /etc/hosts at the same time as changing the host name. This
however is not ideal since it requires a writable /etc file system and
is fragile because the file might be edited by the administrator at
the same time. nss-myhostname simply returns all locally configure
public IP addresses, or -- if none are configured -- the IPv4 address
127.0.0.2 (wich is on the local loopback) and the IPv6 address ::1
(which is the local host) for whatever system hostname is configured
locally. Patching /etc/hosts is thus no longer necessary.

%package -n %{libname}
Summary:       Systemd library package
Group:         System/Libraries

%description -n %{libname}
This package provides the systemd shared library.

%package -n %{libudev}
Summary:       udev library package
Group:         System/Libraries
Requires(pre): filesystem >= 2.1.9-18

%description -n %{libudev}
This package provides the udev shared library.

%package -n %{libudev_devel}
Summary:       udev library development files
Group:         Development/C
Requires:      %{libudev} = %{version}-%{release}
Provides:      udev-devel = %{version}-%{release}
Provides:      libudev-devel = %{version}-%{release}
# (cg) Obsolete the old, versioned devel package
Provides:      %{mklibname -d udev 0} = %{version}-%{release}
Obsoletes:     %{mklibname -d udev 0} < 185

%description -n %{libudev_devel}
This package provides the development files for the udev shared library.

%package -n %{libgudev}
Summary:       gudev library package
Group:         System/Libraries
Requires(pre): filesystem >= 2.1.9-18
Provides:      libgudev = %{version}-%{release}

%description -n %{libgudev}
This package provides the gudev shared library.

%package -n %{libgudev_gir}
Summary:       GObject Introspection interface description for GUdev
Group:         System/Libraries
Requires:      %{libgudev} = %{version}-%{release}
Conflicts:     %{_lib}gudev1.0_0 < 187-5

%description -n %{libgudev_gir}
GObject Introspection interface description for GUdev.


%package -n %{libgudev_devel}
Summary:       gudev library development files
Group:         Development/C
Requires:      %{libgudev} = %{version}-%{release}
Provides:      libgudev-devel = %{version}-%{release}
# (cg) Obsolete the old, versioned devel package
Provides:      %{mklibname -d gudev 0} = %{version}-%{release}
Obsoletes:     %{mklibname -d gudev 0} < 185

%description -n %{libgudev_devel}
This package provides the development files for the gudev shared library.


%prep
%setup -q
%apply_patches
find src/ -name "*.vala" -exec touch '{}' \;

%build
autoreconf --force --install --verbose
#NO_CONFIGURE=1 ./autogen.sh
%configure2_5x \
  --with-rc-local-script-path-start=/etc/rc.d/rc.local \
  --enable-chkconfig \
  --enable-compat-libs \
  --disable-static \
  --disable-selinux \
  --with-firmware-path=%{_prefix}/lib/firmware/updates:%{_prefix}/lib/firmware

%make

%install
%makeinstall_std
find %{buildroot} \( -name '*.a' -o -name '*.la' \) -exec rm {} \;

# (cg) Create and ship folder to hold user rules
install -d -m 755 %{buildroot}%{_sysconfdir}/udev/rules.d

install -m 644 %SOURCE10 %{buildroot}%{_prefix}/lib/udev/rules.d/
install -m 644 %SOURCE11 %{buildroot}%{_prefix}/lib/udev/rules.d/
# udev rules for zte 3g modems and drakx-net
install -m 0644 %SOURCE12 %{buildroot}%{_prefix}/lib/udev/rules.d/

# net rules
install -m 0644 %SOURCE20 %{buildroot}%{_prefix}/lib/udev/rules.d/
install -m 0755 %SOURCE21 %{buildroot}%{_prefix}/lib/udev/net_create_ifcfg
install -m 0755 %SOURCE22 %{buildroot}%{_prefix}/lib/udev/net_action
install -m 0755 -d %{buildroot}%{_sysconfdir}/sysconfig
install -m 0644 %SOURCE23 %{buildroot}%{_sysconfdir}/sysconfig/udev_net


# Create SysV compatibility symlinks. systemctl/systemd are smart
# enough to detect in which way they are called.
mkdir -p %{buildroot}{%{_bindir},%{_sbindir}}
ln -s ../lib/systemd/systemd %{buildroot}%{_bindir}/systemd
ln -s ../lib/systemd/systemd %{buildroot}%{_sbindir}/init
ln -s ../bin/systemctl %{buildroot}%{_bindir}/reboot
ln -s ../bin/systemctl %{buildroot}%{_bindir}/halt
ln -s ../bin/systemctl %{buildroot}%{_bindir}/poweroff
ln -s ../bin/systemctl %{buildroot}%{_sbindir}/shutdown
ln -s ../bin/systemctl %{buildroot}%{_sbindir}/telinit
ln -s ../bin/systemctl %{buildroot}%{_sbindir}/runlevel

# Also add a symlink for udevadm for now as lots of things use an absolute path
ln -s ../bin/udevadm %{buildroot}%{_sbindir}/udevadm

# (cg) Add aliases for prefdm.service
ln -s prefdm.service %{buildroot}%{_prefix}/lib/systemd/system/display-manager.service
ln -s prefdm.service %{buildroot}%{_prefix}/lib/systemd/system/dm.service

# We create all wants links manually at installation time to make sure
# they are not owned and hence overriden by rpm after the used deleted
# them.
rm -r %{buildroot}%{_sysconfdir}/systemd/system/*.target.wants

# (cg) To avoid making life hard for developers, don't package the
# kernel.core_pattern setting until systemd-coredump is a part of an actual
# systemd release and it's made clear how to get the core dumps out of the
# journal.
rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-coredump.conf

# Make sure these directories are properly owned
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants

# And the default symlink we generate automatically based on inittab
rm -f %{buildroot}%{_sysconfdir}/systemd/system/default.target

# (bor) make sure we own directory for bluez to install service
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/bluetooth.target.wants

# (cg) Set up the pager to make it generally more useful
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
cat > %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh << EOF
export SYSTEMD_PAGER="/usr/bin/less -FR"
EOF
chmod 644 %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh

# (bor) enable rpcbind.target by default so we have something to plug
# portmapper service into
ln -s ../rpcbind.target %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants

# create modules.conf as a symlink to /etc/
ln -s /etc/modules %{buildroot}%{_sysconfdir}/modules-load.d/modules.conf

# Create new-style configuration files so that we can ghost-own them
touch %{buildroot}%{_sysconfdir}/hostname
touch %{buildroot}%{_sysconfdir}/vconsole.conf
touch %{buildroot}%{_sysconfdir}/locale.conf
touch %{buildroot}%{_sysconfdir}/machine-id
touch %{buildroot}%{_sysconfdir}/machine-info
touch %{buildroot}%{_sysconfdir}/timezone
mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
mkdir -p %{buildroot}%{_sysconfdir}/udev
touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin

# (cg) Make the journal's persistent in order to provide a real syslog implementation
install -m 0755 -d %{buildroot}%{_logdir}/journal

# (cg) Default preset policy
# (for now, just a placeholder directory)
mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-preset

# Various filetriggers
install -d %{buildroot}%{_var}/lib/rpm/filetriggers

# automatic systemd release on rpm installs/removals
# (see http://wiki.mandriva.com/en/Rpm_filetriggers)
# (cg) I'm not sure if the file list check works against the packaged rpm
#      or what is installed, so I've added both the /lib and /usr/lib paths
#      below, even thought the former is just a symlink to the latter
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.filter << EOF
^./((usr/)?lib/systemd/system/|etc(/rc.d)?/init.d/)
EOF
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.script << EOF
#!/bin/sh
if %{_bindir}/mountpoint -q /sys/fs/cgroup/systemd; then
  if [ -x %{_bindir}/systemctl ]; then
    %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
  fi
fi
EOF
chmod 0755 %buildroot%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.script


# sysusers (make sure to run before tmpfiles)
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/01-sysusers.filter << EOF
^./usr/lib/sysusers.d/
EOF
# TODO Make sysusers support --quiet
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/01-sysusers.script << EOF
#!/bin/sh
exec %{_bindir}/systemd-sysusers
EOF
chmod 0755 %{buildroot}%{_var}/lib/rpm/filetriggers/01-sysusers.script


# tmpfiles (make sure to run early just incase the tmpfiles created are needed by other filetriggers)
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/02-tmpfiles.filter << EOF
^./usr/lib/tmpfiles.d/
EOF
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/02-tmpfiles.script << EOF
#!/bin/sh
exec %{_bindir}/systemd-tmpfiles --create
EOF
chmod 0755 %{buildroot}%{_var}/lib/rpm/filetriggers/02-tmpfiles.script


# hwdb
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/hwdb.filter << EOF
^./usr/lib/udev/hwdb.d/
EOF
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/hwdb.script << EOF
#!/bin/sh
exec %{_bindir}/udevadm hwdb --update
EOF
chmod 0755 %{buildroot}%{_var}/lib/rpm/filetriggers/hwdb.script


# journal catalog
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/journal-catalog.filter << EOF
^./usr/lib/systemd/catalog/
EOF
cat > %{buildroot}%{_var}/lib/rpm/filetriggers/journal-catalog.script << EOF
#!/bin/sh
exec %{_bindir}/journalctl --update-catalog
EOF
chmod 0755 %{buildroot}%{_var}/lib/rpm/filetriggers/journal-catalog.script



# This file is already in sytemd-ui rpm
rm -fr %{buildroot}%_mandir/man1/systemadm.*

# (cg) These are the compat libs but we don't need them in cauldron.
# All we need is the pkgconfig files so we can rebuild everything and
# kill off the need for the old library packages (which will remain installed
# and operational due to our packaging policy)
for lib in daemon id128 journal login; do
  rm -f %{buildroot}%{_libdir}/libsystemd-$lib.so{,.0.*}
done

%find_lang %{name}


%triggerin -- glibc
# reexec daemon on self or glibc update to avoid busy / on shutdown
# trigger is executed on both self and target install so no need to have
# extra own post
if [ $1 -ge 2 -o $2 -ge 2 ] ; then
	%{_bindir}/systemctl daemon-reexec 2>&1 || :
fi

%pre
# (cg) Cannot use rpm-helper scripts as it results in a cyclical dep as
# rpm-helper requires systemd-units which in turn requires systemd...
if ! getent group %{name}-journal >/dev/null 2>&1; then
  /usr/sbin/groupadd -r %{name}-journal >/dev/null || :
fi

# Write on first install or upgrade from MGA3.
if [ ! -r %{_prefix}/lib/sysctl.d/50-default.conf ]; then
  if [ ! -d %{_sysconfdir}/sysctl.d ]; then
    mkdir -m 0755 %{_sysconfdir}/sysctl.d
  fi
  cat > %{_sysconfdir}/sysctl.d/51-alt-sysrq.conf << EOF
# This file ensures that the Alt+SysRq Magic keys still work.
# This setting is insecure, although commonly expected and you can remove this
# file to disable this feature. It will not be readded on future systemd
# upgrades/updates.
# http://en.wikipedia.org/wiki/Magic_SysRq_key#Security
kernel.sysrq = 1
EOF

fi

%post
%{_bindir}/systemd-machine-id-setup > /dev/null 2>&1 || :
%{_prefix}/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || :
#%{_bindir}/systemctl daemon-reexec > /dev/null 2>&1 || :

%triggerun -- %{name} < 208
chgrp -R systemd-journal /var/log/journal || :
chmod 02755 /var/log/journal || :
if [ -f /etc/machine-id ]; then
	chmod 02755 /var/log/journal/$(cat /etc/machine-id) || :
fi

%post units
if [ $1 -eq 1 ] ; then
        # Try to read default runlevel from the old inittab if it exists
        runlevel=$(%{_bindir}/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
        if [ -z "$runlevel" ] ; then
                target="%{_prefix}/lib/systemd/system/multi-user.target"
        else
                target="%{_prefix}/lib/systemd/system/runlevel$runlevel.target"
        fi

        # And symlink what we found to the new-style default.target
        %{_bindir}/ln -sf "$target" %{_sysconfdir}/systemd/system/default.target || :

        # Enable the services we install by default.
        %{_bindir}/systemctl --quiet preset \
                remote-fs.target \
                getty@.service \
                serial-getty@.service \
                console-getty.service \
                console-shell.service \
                debug-shell.service \
                systemd-timesyncd.service \
                systemd-networkd.service \
                systemd-networkd-wait-online.service \
                systemd-resolved.service \
                2>/dev/null || :
fi

hostname_new=`cat %_sysconfdir/hostname 2>/dev/null`
if [ -z $hostname_new ]; then
        hostname_old=`cat /etc/sysconfig/network 2>/dev/null | grep HOSTNAME | cut -d "=" -f2`
        if [ ! -z $hostname_old ]; then
                echo $hostname_old >> %_sysconfdir/hostname
        else
                echo "localhost" >> %_sysconfdir/hostname
        fi
fi

%preun units
if [ $1 -eq 0 ] ; then
        %{_bindir}/systemctl --quiet disable \
                getty@.service \
                remote-fs.target \
                2>&1 || :

        %{_bindir}/rm -f %_sysconfdir/systemd/system/default.target 2>&1 || :
fi

%postun units
if [ $1 -ge 1 ] ; then
        %{_bindir}/systemctl daemon-reload 2>&1 || :
fi

%triggerin units -- %{name}-units < 215
        # Enable the services we install by default.
        %{_bindir}/systemctl --quiet preset systemd \
                remote-fs.target \
                getty@.service \
                serial-getty@.service \
                console-getty.service \
                console-shell.service \
                debug-shell.service \
                systemd-timesyncd.service \
                systemd-networkd.service \
                systemd-networkd-wait-online.service \
                systemd-resolved.service \
                2>/dev/null || :
        # rc-local is now enabled by default in base package
        # and read-ahead stuff is no more
        rm -f %_sysconfdir/systemd/system/multi-user.target.wants/rc-local.service \
              %_sysconfdir/systemd/system/default.target.wants/systemd-readahead-{collect,replay}.service || :

%files -f %{name}.lang
# (cg) Note some of these directories are empty, but that is intended
%dir %{_prefix}/lib/systemd
%dir %{_prefix}/lib/systemd/system-generators
%dir %{_prefix}/lib/systemd/system-shutdown
%dir %{_prefix}/lib/systemd/system-sleep
%dir %{_prefix}/lib/systemd/network
%dir %{_prefix}/lib/tmpfiles.d
%dir %{_prefix}/lib/sysctl.d
%dir %{_prefix}/lib/modules-load.d
%dir %{_prefix}/lib/kernel
%dir %{_prefix}/lib/kernel/install.d
%dir %{_prefix}/lib/binfmt.d
%{_var}/lib/rpm/filetriggers/*.filter
%{_var}/lib/rpm/filetriggers/*.script
%config(noreplace) %{_sysconfdir}/sysconfig/udev_net
%config(noreplace) %{_sysconfdir}/systemd/bootchart.conf
%config(noreplace) %{_sysconfdir}/systemd/coredump.conf
%config(noreplace) %{_sysconfdir}/systemd/journald.conf
%config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf
%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf
%config(noreplace) %{_sysconfdir}/systemd/resolved.conf
%config(noreplace) %{_sysconfdir}/systemd/system.conf
%config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf
%config(noreplace) %{_sysconfdir}/systemd/logind.conf
%config(noreplace) %{_sysconfdir}/systemd/user.conf
%config(noreplace) %{_sysconfdir}/udev/udev.conf
%ghost %{_sysconfdir}/udev/hwdb.bin
%{_sysconfdir}/xdg/systemd
%ghost %config(noreplace) %{_sysconfdir}/hostname
%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}/timezone
%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
# (cg) NB dbus policy files are not really config that users are expected to
# edit manually and thus should NOT be marked as config(noreplace).
# This should really be fixed in upstream dbus (work in progress)
# to separate these policy files from /etc and ship them in /usr instead
# but allow override by admins by copying to /etc.
# There are security implications here (CVE's have been issued due to mistakes
# in these type of files)
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
%{_sysconfdir}/pam.d/%{name}-user
%dir %{_sysconfdir}/udev/rules.d
%{_prefix}/lib/systemd/network/80-container-host0.network
%{_prefix}/lib/systemd/network/80-container-ve.network
%{_prefix}/lib/systemd/network/99-default.link
# (cg) NB See pre script for soemthing that relies on this name...
# If it is ever renamed, change the pre script too
%{_prefix}/lib/sysctl.d/50-default.conf
#%{_prefix}/lib/sysctl.d/50-coredump.conf
%{_prefix}/lib/sysusers.d/basic.conf
%{_prefix}/lib/sysusers.d/systemd.conf
%{_prefix}/lib/sysusers.d/systemd-remote.conf
%{_prefix}/lib/tmpfiles.d/etc.conf
%{_prefix}/lib/tmpfiles.d/legacy.conf
%{_prefix}/lib/tmpfiles.d/systemd.conf
%{_prefix}/lib/tmpfiles.d/systemd-nologin.conf
%{_prefix}/lib/tmpfiles.d/systemd-remote.conf
%{_prefix}/lib/tmpfiles.d/tmp.conf
%{_prefix}/lib/tmpfiles.d/var.conf
%{_prefix}/lib/tmpfiles.d/x11.conf
%{_prefix}/lib/kernel/install.d/50-depmod.install
%{_prefix}/lib/kernel/install.d/90-loaderentry.install
%{_bindir}/bootctl
%{_bindir}/busctl
%{_bindir}/coredumpctl
%{_bindir}/hostnamectl
%{_bindir}/journalctl
%{_bindir}/kernel-install
%{_bindir}/localectl
%{_bindir}/loginctl
%{_bindir}/machinectl
%{_bindir}/networkctl
%{_bindir}/systemd
%{_bindir}/systemd-ask-password
%{_bindir}/systemd-escape
%{_bindir}/systemd-firstboot
%{_bindir}/systemd-inhibit
%{_bindir}/systemd-machine-id-setup
%{_bindir}/systemd-notify
%{_bindir}/systemd-path
%{_bindir}/systemd-run
%{_bindir}/systemd-sysusers
%{_bindir}/systemd-tmpfiles
%{_bindir}/systemd-tty-ask-password-agent
%{_bindir}/timedatectl
%{_bindir}/reboot
%{_bindir}/halt
%{_bindir}/poweroff
%{_sbindir}/shutdown
%{_sbindir}/init
%{_sbindir}/telinit
%{_sbindir}/runlevel
%{_sbindir}/udevadm
%{_prefix}/lib/systemd/systemd*
%{_prefix}/lib/systemd/system-generators/systemd-*
%{_prefix}/lib/udev
%{_libdir}/security/pam_systemd.so
%{_bindir}/systemd-analyze
%{_bindir}/systemd-cat
%{_bindir}/systemd-cgls
%{_bindir}/systemd-cgtop
%{_bindir}/systemd-delta
%{_bindir}/systemd-detect-virt
%{_bindir}/systemd-nspawn
%{_bindir}/systemd-stdio-bridge
%{_bindir}/udevadm
%dir %{_datadir}/systemd
%{_datadir}/systemd/kbd-model-map
%dir %{_datadir}/systemd/gatewayd
%{_datadir}/systemd/gatewayd/browse.html
%{_mandir}/man1/bootctl.*
%{_mandir}/man1/busctl.*
%{_mandir}/man1/coredumpctl.*
%{_mandir}/man1/hostnamectl.*
%{_mandir}/man1/journalctl.*
%{_mandir}/man1/localectl.*
%{_mandir}/man1/loginctl.*
%{_mandir}/man1/machinectl.*
%{_mandir}/man1/systemd.*
%{_mandir}/man1/systemd-*
%{_mandir}/man1/timedatectl.*
%{_mandir}/man3/*
%{_mandir}/man5/*
%{_mandir}/man7/*
%{_mandir}/man8/kernel-install.*
%{_mandir}/man8/pam_systemd.*
%{_mandir}/man8/systemd-*
%{_mandir}/man8/udevadm.*
%{_mandir}/man1/init.*
%{_mandir}/man8/halt.*
%{_mandir}/man8/reboot.*
%{_mandir}/man8/shutdown.*
%{_mandir}/man8/poweroff.*
%{_mandir}/man8/telinit.*
%{_mandir}/man8/runlevel.*
%{_sysconfdir}/init.d/README
%{_logdir}/README
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service
%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
%dir %{_datadir}/factory
%dir %{_datadir}/factory/etc
%{_datadir}/factory/etc/nsswitch.conf
%dir %{_datadir}/factory/etc/pam.d
%{_datadir}/factory/etc/pam.d/other
%{_datadir}/factory/etc/pam.d/system-auth
%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
%{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
%{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
%{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
%{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
%{_docdir}/systemd
%{_prefix}/lib/systemd/catalog/systemd.catalog
%lang(fr) %{_prefix}/lib/systemd/catalog/systemd.fr.catalog
%lang(it) %{_prefix}/lib/systemd/catalog/systemd.it.catalog
%lang(ru) %{_prefix}/lib/systemd/catalog/systemd.ru.catalog
%lang(pl) %{_prefix}/lib/systemd/catalog/systemd.pl.catalog
%attr(02755,root,systemd-journal) %dir %{_logdir}/journal

%files units
# (cg) Note some of these directories are empty, but that is intended
# NB I'm not totally sure of the ownership split of directories between systemd and systemd-units.
%dir %{_sysconfdir}/systemd
%dir %{_sysconfdir}/systemd/system
%dir %{_sysconfdir}/systemd/user
%dir %{_sysconfdir}/tmpfiles.d
%dir %{_sysconfdir}/sysctl.d
%dir %{_sysconfdir}/modules-load.d
%dir %{_sysconfdir}/binfmt.d
%dir %{_datadir}/bash-completion
%{_bindir}/systemctl
%{_datadir}/bash-completion/completions
%{_datadir}/zsh/site-functions
%{_sysconfdir}/profile.d/40systemd.sh
%{_sysconfdir}/modules-load.d/*.conf
%{_prefix}/lib/systemd/system
%{_prefix}/lib/systemd/system-preset
%{_prefix}/lib/systemd/user
%{_prefix}/lib/systemd/user-preset
%{_mandir}/man1/systemctl.*

%files -n python-%{name}
%{py_platsitedir}/%{name}

%files devel
%{_includedir}/systemd
%{_libdir}/libsystemd*.so
%{_libdir}/pkgconfig/libsystemd*.pc
%{_datadir}/pkgconfig/systemd.pc
%{_prefix}/lib/rpm/macros.d/macros.systemd

%files -n nss-myhostname
%{_mandir}/man8/nss-myhostname.*
%{_libdir}/libnss_myhostname.so.2
# (cg) Yes, this is a hack for now, I'll likely rename the package to just lib[64]systemd-nss2 or something...
%{_libdir}/libnss_mymachines.so.2
%{_libdir}/libnss_resolve.so.2

%files -n %{libname}
%defattr(-,root,root,-)
%{_libdir}/libsystemd.so.%{libsystemd_major}*

%files -n %{libudev}
%{_libdir}/libudev.so.%{libudev_major}*

%files -n %{libudev_devel}
%{_libdir}/libudev.so
%{_includedir}/libudev.h
%{_datadir}/pkgconfig/udev.pc
%{_libdir}/pkgconfig/libudev.pc

%files -n %{libgudev}
%{_libdir}/libgudev-%{libgudev_api}.so.%{libgudev_major}*

%files -n %{libgudev_gir}
%{_libdir}/girepository-1.0/GUdev-%{libgudev_api}.typelib

%files -n %{libgudev_devel}
%{_libdir}/libgudev-%{libgudev_api}.so
%{_includedir}/gudev-%{libgudev_api}
%{_libdir}/pkgconfig/gudev-%{libgudev_api}.pc
%{_datadir}/gir-1.0/GUdev-%{libgudev_api}.gir


%changelog
* Mon Oct 03 2016 colin <colin> 217-11.2.mga5
+ Revision: 1058207
- Fix mtd_probe build.
- Add fixes for CVE-2016-7796 mga#19494
- Remove old triggerun (they didn't really do what we thought)

  + doktor5000 <doktor5000>
    - added upstream fix backported from systemd 221, supposedly fixes mga#16396
      o after recent polkit changes, current user session is sometimes recognised
        as "online" instead of "active" and then polkit authorisation fails

* Wed Jun 03 2015 tmb <tmb> 217-11.mga5
+ Revision: 822879
- push to /release

* Wed Jun 03 2015 tmb <tmb> 217-10.mga5
+ Revision: 822874
- everywhere: remove configurability of sysv runlevel to target mapping (mga#15670)

* Tue May 12 2015 akien <akien> 217-9.mga5
+ Revision: 821935
- udev: downgrade a few warnings to debug messages (mga#14817)

* Sun Feb 08 2015 colin <colin> 217-8.mga5
+ Revision: 814221
- Don't create system users we don't need (upstream)
- Better deal with destroying cgroups (don't hide processes still running) (upstream)
- Get proper user privs for journal capturing of stdout/err (upstream)
- Fix ioctl for revoke emulation in logind (upstream)
- Support more search paths for locales (mga)

* Mon Nov 10 2014 colin <colin> 217-7.mga5
+ Revision: 796188
- ensure sync() on forced reboots (upstream)
- ensure vconsole-setup is rerun appropriately as needed (upstream)

* Fri Nov 07 2014 colin <colin> 217-6.mga5
+ Revision: 795996
- Add upstream fix for poweroff->reboot issue (mga#14432)
- Change hwdb updates to filetriggers
- Change journal catalog updates to filetriggers

* Tue Nov 04 2014 colin <colin> 217-5.mga5
+ Revision: 795651
- Use Type=notify for journald to prevent flush race (mga#14452)
- Revert hwdb patch as it cannot find our file in /etc/udev/hwdb.bin

* Tue Nov 04 2014 colin <colin> 217-4.mga5
+ Revision: 795591
- Quick hack to see if it helps with mga#14452

* Mon Nov 03 2014 colin <colin> 217-3.mga5
+ Revision: 795327
- Add a couple cherry picks from upstream (mga#14444, mga#14427)

* Sun Nov 02 2014 colin <colin> 217-2.mga5
+ Revision: 795202
- Fix error about binding to systemd notify socket.

* Thu Oct 30 2014 colin <colin> 217-1.mga5
+ Revision: 794712
- Fix an issue with nspawn for bind mount points that already exist
- Remove references to systemd-readahead which is no longer packaged
- New version: 217

* Mon Oct 27 2014 colin <colin> 216-10.mga5
+ Revision: 793905
- Move preset definitions to systemd-units for proper service enabling

* Mon Oct 27 2014 colin <colin> 216-9.mga5
+ Revision: 793898
- Do not enable some less common services (disabled by preset, but policy not yet installed)

* Sun Oct 19 2014 colin <colin> 216-8.mga5
+ Revision: 791617
- Do not run tmpfiles manually on first install (filetriggers should handle)

* Wed Oct 15 2014 umeabot <umeabot> 216-7.mga5
+ Revision: 742458
- Second Mageia 5 Mass Rebuild

* Sat Oct 04 2014 colin <colin> 216-6.mga5
+ Revision: 736848
- Remove dangling symlinks for no longer needed devel libraries

* Fri Oct 03 2014 tmb <tmb> 216-5.mga5
+ Revision: 736578
- rebuild for deps

* Sat Sep 27 2014 tv <tv> 216-4.mga5
+ Revision: 730468
- rebuild for missing pythoneggs deps

* Fri Sep 26 2014 wally <wally> 216-3.mga5
+ Revision: 724961
- rebuild with new rpm-mageia-setup to generate requires for .typelib files

* Tue Sep 16 2014 umeabot <umeabot> 216-2.mga5
+ Revision: 689666
- Mageia 5 Mass Rebuild

* Sun Aug 31 2014 colin <colin> 216-1.mga5
+ Revision: 669819
- Add missing BRs for new version
- Obsolete bootchart
- New version: 216
- New version: 215
- Fix daemon-reload filetrigger (only one line and cover sysvinit too)
- Consolidate library packages to the upstream libsystemd lib
- Add (prioritized) filetriggers for sysusers and tmpfiles
- Drop upstream patches
- Rebase downstream patches
- Provide compat pkgconfig .pc files for deprecated libs
- Add temporary devel() Provides hacks to allow convenient rebuilds

  + pterjan <pterjan>
    - Rebuild for new Python

* Wed Apr 16 2014 colin <colin> 208-15.mga5
+ Revision: 615235
- Update to latest v208-stable (incl. ask-password buffer o/f fix mga#13219)
- Rebase downstream patch
- Drop reverting of upstream change (the underlying issue should be resolved)

* Tue Feb 25 2014 colin <colin> 208-14.mga5
+ Revision: 596920
- Switch to official stable branch for 208 patches.

* Sun Feb 23 2014 colin <colin> 208-13.mga5
+ Revision: 595992
- Disable those patches which are also disabled in Fedora.

* Sun Feb 23 2014 colin <colin> 208-12.mga5
+ Revision: 595970
- Sync with Fedora backport fixes for v208

* Sun Feb 09 2014 colin <colin> 208-11.mga5
+ Revision: 587060
- Drop problematic patch from Fedora (subsequently dropped) related to /run/nologin
- Fix path to root-fsck service (mostly cosmetic)

* Mon Jan 27 2014 colin <colin> 208-10.mga4
+ Revision: 568432
- Default to the 'insecure' sysrq options (should be handled by msec long term) mga#10473
- Add a patch to work around user-session exit problems (slowing shutdown)

* Wed Jan 22 2014 colin <colin> 208-9.mga4
+ Revision: 567415
- Fix static nodes when multiple nodes are supplied in a single rule mga#12382

* Thu Jan 16 2014 colin <colin> 208-8.mga4
+ Revision: 566664
- Various upstream backports (brings patchset roughly in line with fedora)

* Mon Jan 13 2014 colin <colin> 208-7.mga4
+ Revision: 566495
- Require chkconfig version with the appropriate patch for smooth upgrades mga#12278

* Mon Jan 13 2014 colin <colin> 208-6.mga4
+ Revision: 566488
- Ensure native unit [Install] section information is suppressed for sysvinit scripts on enable
- Ensure chkconfig does not reload systemd when we are mid-operation (mga#12278)
- Process installed tmpfiles on first install (handles early pkg ordering issues)
- Add upstream/backported fixes for various logind issues.
- Suppress (albeit harmless) PAM error during su/sudo (resulting from SuSE patch)

* Mon Dec 09 2013 colin <colin> 208-5.mga4
+ Revision: 556011
- Drop redundant patch (/var/run IS a symlink to /run) and renumber
- Add upstream cherry pick to not set XDG_RUNTIME_DIR when raising privs.
- Add upstream cherry-picks (same set as Fedora)
- Use correct tarball

* Thu Oct 31 2013 colin <colin> 208-4.mga4
+ Revision: 548137
- Revert conversion to posttrans as this doesn't run the needed scripts on first install

* Tue Oct 29 2013 tv <tv> 208-3.mga4
+ Revision: 547777
- move systemd-unit %%post into %%posttrans (trying to fix install deps loop errors)

* Mon Oct 21 2013 umeabot <umeabot> 208-2.mga4
+ Revision: 540515
- Mageia 4 Mass Rebuild

* Tue Oct 08 2013 colin <colin> 208-1.mga4
+ Revision: 493791
- Ensure the systemd-journal group is created before installing (mga#11264)
- New version: 208
- Rename the network rules to come after network device renaming

* Sun Sep 22 2013 colin <colin> 207-2.mga4
+ Revision: 483351
- Ensure the 'systemd-journal' group is created at install time (mga#11264)

* Sat Sep 21 2013 colin <colin> 207-1.mga4
+ Revision: 482887
- New version: 207
- Add various patches from upstream
- Revert problematic patch from upstream leading to startup delays
- Add patch from ML to address a timeout problem when stopping type=notify units

* Wed Sep 11 2013 colin <colin> 206-8.mga4
+ Revision: 477592
- Rebuild for new libcryptsetup

* Mon Sep 09 2013 colin <colin> 206-7.mga4
+ Revision: 476579
- Enable chkconfig support (mga#11191)

* Mon Sep 02 2013 colin <colin> 206-6.mga4
+ Revision: 474322
- Fix logind race condition (causes unlock issue in GNOME fdo#67273)

* Wed Aug 07 2013 colin <colin> 206-5.mga4
+ Revision: 464364
- Fix getty@ template service enabling at install time (mga#10931)

* Wed Aug 07 2013 colin <colin> 206-4.mga4
+ Revision: 464295
- Drop old, unrecognised configure arguments.
- Pass the Mageia path to rc.local script for compatibility (mga#10942)

* Fri Jul 26 2013 colin <colin> 206-3.mga4
+ Revision: 458501
- Add some upstream cherry-picks.
- Add upstream fix for udev static node permissions (mga#10840)

* Thu Jul 25 2013 colin <colin> 206-2.mga4
+ Revision: 457926
- Reorder scripts (spec cosmetics)
- Convert the netif name change disabling to a triggerun (mga4 feature)
- Perform a few extra housekeeping jobs after install/upgrade
- Ensure hwdb is properly shipped and populated on install/upgrade

* Thu Jul 25 2013 colin <colin> 206-1.mga4
+ Revision: 457904
- Enable consistent network device naming but disable on upgrade (mga4 feature)
- Remove the racy network device renaming loop patch + netif rules generator (mga4 feature)
- Provide the nss-myhostname package (with higher version than current separate package)
- nsswitch.conf patching not included in favour of including directly in default conf in glibc
- New version: 206
- Drop upstream cherry-pick patches
- Fix file lists
- Rediff Mageia patches

* Tue Jun 18 2013 colin <colin> 204-2.mga4
+ Revision: 444838
- Apply various upstream fixes

* Sat May 25 2013 colin <colin> 204-1.mga4
+ Revision: 427633
- New version: 204
- Drop upstream cherry pick patches
- Move systemd-analyze to main package and deprecated systemd-tools package

* Fri May 03 2013 colin <colin> 195-22.mga3
+ Revision: 412191
- Make default journal default to leaving 15%% free space (mga#9921)

* Sun Apr 28 2013 colin <colin> 195-21.mga3
+ Revision: 411531
- Kill unneeded directory
- Fix floating point errors with two upstream cherry picks (mga#9850)
- Re-enable previously disabled patches now that floating point error is fixed (mga#9689)

* Thu Apr 11 2013 colin <colin> 195-20.mga3
+ Revision: 409599
- Add some missing patches from SuSE package analysis
- Disable udev patches to prevent Floating point exception (mga#9689)

* Mon Apr 08 2013 colin <colin> 195-19.mga3
+ Revision: 409144
- Compile, but do not enable the coredump capturing capabilities
- Add numerous upstream patches (after reviewing SuSE package patches)
- Add SuSE patch to restore cdrw, dvd and dvdrw symlinks (mga#8524)

* Mon Apr 01 2013 colin <colin> 195-18.mga3
+ Revision: 406960
- Fix the (ugly) net rule generator to not call udevadm info --run which no longer exists

* Mon Apr 01 2013 colin <colin> 195-17.mga3
+ Revision: 406949
- Fix install line
- Make the write_net_rules able to make the rules dir if needed
- Ship /etc/udev/rules.d folder for user rules.

* Fri Feb 08 2013 colin <colin> 195-16.mga3
+ Revision: 395370
- Provide 'system-logger' rather than 'syslog-daemon' as some pkgs may require a real syslog

* Tue Feb 05 2013 tmb <tmb> 195-15.mga3
+ Revision: 394711
- write_net_rules needs to be executable to actually work

* Sun Jan 27 2013 colin <colin> 195-14.mga3
+ Revision: 392732
- Add some more upstream patches to solve problems of overzealous cleanup of PrivateTmp=yes dirs

* Sun Jan 27 2013 colin <colin> 195-13.mga3
+ Revision: 392724
- The quota services are now pulled in by mount points, hence no need to enable them explicitly

* Sun Jan 27 2013 colin <colin> 195-12.mga3
+ Revision: 392699
- Fully obsolete main sysvinit package (tools are still required)

* Sat Jan 26 2013 colin <colin> 195-11.mga3
+ Revision: 392489
- Drop a patch that has not been needed since the fstab generator rewrite

* Sat Jan 26 2013 colin <colin> 195-10.mga3
+ Revision: 392484
- Add various upstream fixes (those included in fedora's v195 package)
- Add back the sub-optimal network interface generator until mga4 i/f rename

* Tue Jan 22 2013 tv <tv> 195-9.mga3
+ Revision: 391054
- adjust group

* Tue Jan 15 2013 colin <colin> 195-8.mga3
+ Revision: 388269
- Fix build with latest glibc
- Fix autoreconf call (missing build-aux/test-driver)
- Remove ghosted files in /etc. Not needed.

  + umeabot <umeabot>
    - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Dec 13 2012 colin <colin> 195-6.mga3
+ Revision: 330108
- Relax perms on /sys/kernel/debug for lspcidrake by non-root

* Thu Nov 29 2012 colin <colin> 195-5.mga3
+ Revision: 322974
- Apply upstream patch to fix a crash related service name lookups.
- Enable xz compression in journal logs.

* Wed Nov 07 2012 blino <blino> 195-4.mga3
+ Revision: 315425
- restart systemd-logind.service on systemd 195 upgrade to fix errors on login (logind protocol changed)

* Tue Nov 06 2012 blino <blino> 195-3.mga3
+ Revision: 314560
- obsolete consolekit, replaced by systemd-logind

* Sun Oct 28 2012 colin <colin> 195-2.mga3
+ Revision: 311312
- Enable persistent journal logs and provide syslog-daemon

* Tue Oct 23 2012 colin <colin> 195-1.mga3
+ Revision: 309449
- New version: 195
- Drop patches committed upstream

* Tue Oct 23 2012 cjw <cjw> 194-3.mga3
+ Revision: 309338
- add back udev support for interface renaming that was removed upstream

* Tue Oct 16 2012 colin <colin> 194-2.mga3
+ Revision: 307118
- Hopefully fix journald mmap leaks (mga#7675)

* Mon Oct 08 2012 colin <colin> 194-1.mga3
+ Revision: 303584
- New version: 194
- Drop tmpfiles filetrigger - it runs too late to be of universal usefulness

* Tue Oct 02 2012 guillomovitch <guillomovitch> 193-2.mga3
+ Revision: 302245
- add rpm filetriggers to run systemd-tmpfiles immediatly after package
  installation (fix #7569)

* Sun Sep 30 2012 colin <colin> 193-1.mga3
+ Revision: 301032
- Add BuildRequires on libmicrohttpd for journal-gatewayd
- New version: 193

* Thu Sep 27 2012 colin <colin> 192-1.mga3
+ Revision: 298538
- New version: 192
- Drop upstream applied patches

* Thu Sep 13 2012 colin <colin> 189-5.mga3
+ Revision: 293658
- Add epoch to usermode conflict

* Fri Sep 07 2012 colin <colin> 189-4.mga3
+ Revision: 289306
- Move reboot, halt and poweroff to bindir (removed from usermode)

* Tue Sep 04 2012 colin <colin> 189-3.mga3
+ Revision: 288278
- Various fixes to logind (sent upstream)

* Tue Aug 28 2012 colin <colin> 189-2.mga3
+ Revision: 284851
- Drop /proc/bus/usb mount as it's no longer available with kernels >= 3.5

* Fri Aug 24 2012 colin <colin> 189-1.mga3
+ Revision: 283679
- New version: 189

* Sat Aug 11 2012 colin <colin> 188-1.mga3
+ Revision: 280625
- New version: 188
- Rediff patches (restore prefdm removed from upstream for now)

* Sun Jul 29 2012 wally <wally> 187-6.mga3
+ Revision: 275776
- fix GUdev gir typelib pkg conflicts

* Sun Jul 29 2012 wally <wally> 187-5.mga3
+ Revision: 275772
- fix systemd-id128 library package name
- create a subpkg for GUdev gir typelib

* Tue Jul 24 2012 colin <colin> 187-4.mga3
+ Revision: 273984
- Rebuild with new cryptsetup

* Sun Jul 22 2012 blino <blino> 187-3.mga3
+ Revision: 273550
- remove /run/.mageia-network check for network initscript, unneded now that /var/lock is a symlink to /run/lock

* Sun Jul 22 2012 colin <colin> 187-2.mga3
+ Revision: 273411
- Update for a post-usrmove world

* Fri Jul 20 2012 colin <colin> 187-1.mga3
+ Revision: 272814
- New version: 187

* Thu Jul 19 2012 blino <blino> 186-2.mga3
+ Revision: 272623
- create and own /usr/lib/systemd/ntp-units.d (like in Fedora, useful for systemd >= 186)

* Wed Jul 04 2012 colin <colin> 186-1.mga3
+ Revision: 267780
- Simplify -devel packaging (one systemd, one udev, one gudev)
- New version: 186
- Drop upstream cherry-pick patches
- Drop upstream applied patches
- Rebase remaining patches (update udevadm settle patch for new code style)
- Drop redundant config file tweaks

* Sun Jul 01 2012 colin <colin> 185-4.mga3
+ Revision: 266233
- Migrate missing rules and related helpers from udev package.
- Migrate all missed patches from udev package (except udev-acl)

* Sun Jul 01 2012 colin <colin> 185-3.mga3
+ Revision: 265987
- Fix a missed service rename reference.

* Sat Jun 30 2012 colin <colin> 185-2.mga3
+ Revision: 265522
- Rename systemd-udev.service to systemd-udevd.service (upstream approved)

* Fri Jun 29 2012 colin <colin> 185-1.mga3
+ Revision: 264925
- New version: 185
- Merge udev package into systemd (upstream merge)
- Merge systemd-sysvinit into systemd package (sysvinit is no longer supported)
- Drop patches applied upstream.
- Cherry pick selected upstream commits
- Rebase Mageia customisation patches.
- Reimplement noauto patch for fstab entries (to prevent network mounts holding up login)
- Fix -devel library names (drop major)

* Thu Jun 14 2012 guillomovitch <guillomovitch> 185-0.1.mga3
+ Revision: 260575
- drop patch 511 (nfs-common service dependency)

* Sun May 20 2012 colin <colin> 44-13.mga2
+ Revision: 235955
- Ensure that common NFS services are started before any shares are mounted (mga#5890)

* Thu May 10 2012 colin <colin> 44-12.mga2
+ Revision: 235024
- Fix a memory leak in logind
- Include upstream commit to ignore getty's on isloation (mga#5760)
- Fix issue with rescue shell on fsck errors (rhbz#798328)
- Fix issue on overzealous process killing (rhbz#816842, rhbz#805942)
- Use generic target for ntp related implementations (allows migration to chrony in the future)
- Add upstream fix for leftover /tmp/systemd-namespace* folders (mga#5602, rhbz#810257)
- Renumber patches to drop fully patch 121 (which is already excluded)

* Wed May 02 2012 colin <colin> 44-11.mga2
+ Revision: 234557
- Silence systemd output when starting getty (mga#5091)
- Fix SIGRTMIN+21 value (I previously miscalculated)

* Sun Apr 29 2012 colin <colin> 44-10.mga2
+ Revision: 234189
- Default to multi-user.target on initial install as per initscripts (mga#5668)

* Thu Apr 26 2012 colin <colin> 44-9.mga2
+ Revision: 233322
- Fix an issue where Mageia specific code in m4 files was not processed.

* Tue Apr 17 2012 colin <colin> 44-8.mga2
+ Revision: 231247
- Drop patch that creates an ordering cycle on syslog rather than preventing it
- Mark some config files as such.

  + alien <alien>
    - Ask the user to reboot if this package is updated (mga#5388)

* Sun Apr 08 2012 colin <colin> 44-7.mga2
+ Revision: 229702
- Drop upstream patch as it seems to break OnFailure handiling.
- Tweak the display-manager-failure message to show up quicker (and use agetty)

* Sun Apr 08 2012 colin <colin> 44-6.mga2
+ Revision: 229679
- Bump for sysvinit-legacy

* Fri Apr 06 2012 colin <colin> 44-5.mga2
+ Revision: 229315
- More upstream cherry-picks
- Small fix to display manager failure system.

* Sun Apr 01 2012 colin <colin> 44-4.mga2
+ Revision: 227734
- Rebuild for new sysvinit-legacy
- No need to remove var-{lock,run}.mount units. Upstream patch removes them.
- No need to set MountAuto/SwapAuto to yes. This is the default.

* Sun Apr 01 2012 colin <colin> 44-3.mga2
+ Revision: 227667
- Numerous upstream cherry picks
- Drop usless Mandriva patch (we didn't use what it added)
- Ensure network filesystems will hold up DM only when 'nofail' is omitted in fstab
- Do not make DM wait for rc.local (we don't do thus under sysvinit)
- Make the DM failure script start later if it runs
- Fix small cosmetic issue in systemd-analyse when run too quickly after boot
- Note: journalctl and loginctl have now dropped their systemd- prefix

* Thu Mar 22 2012 dmorgan <dmorgan> 44-2.mga2
+ Revision: 225731
- Do not build the gtk UI anymore ( will be in an other rpm)

* Wed Mar 21 2012 colin <colin> 44-1.mga2
+ Revision: 225172
- Don't own /etc/profile.d dir
- New version: 44 (numerous fixes to journal+endien conversions)
- Set default pager to be more color and screen friendly
- Disable journal coredump swallowing until it gets better tools to work with it.
- Do not process modprobe.preload. This is handled by fedora-loadmodules.service
- Add patch to address CVE-2012-1174 (symlink attack)

* Mon Mar 12 2012 colin <colin> 43-5.mga2
+ Revision: 222893
- Disable rsyslog specific hacks - it does it itself now.

* Thu Mar 08 2012 colin <colin> 43-4.mga2
+ Revision: 221745
- Upstream patch to fix journal segvs (mga#4588)
- Add unit to run a special info script on display manager failure (mga#4769)

* Wed Mar 07 2012 tmb <tmb> 43-3.mga2
+ Revision: 221224
- bump sysvinit version-release provides

* Sat Mar 03 2012 colin <colin> 43-2.mga2
+ Revision: 217274
- Interpret splash=silent as an equiv of quiet (prevents some plymouth flickering)
- Recognise 'failsafe' kernel command line as synonym for 'single' (mga#4702)

* Fri Feb 24 2012 colin <colin> 43-1.mga2
+ Revision: 213880
- Add BR for docbook-style-xsl (for man pages)
- Add BR for xsltproc (for man pages)
- Add BR for libkmod
- New version: 43
- Rediffed patches
- Make prefdm conflict with getty@tty1
- Disable statically configured getty's for tty[2-6] (they are auto-activated)
- Fix distro tag in configure and drop now redundant options.

* Thu Feb 16 2012 colin <colin> 40-3.mga2
+ Revision: 209739
- Bump sysvinit release

* Tue Feb 07 2012 dmorgan <dmorgan> 40-2.mga2
+ Revision: 206042
- New version 40
  Enable libcryptsetup support

* Thu Jan 26 2012 dmorgan <dmorgan> 39-3.mga2
+ Revision: 202019
- Rebuild now that lockdev is fixed

* Thu Jan 26 2012 dmorgan <dmorgan> 39-2.mga2
+ Revision: 201786
- Requires lockdev ( mga #3551)

* Wed Jan 25 2012 colin <colin> 39-1.mga2
+ Revision: 201521
- New version: 39
- Enhanced filetriggers and made them non-config files (no more .rpmnews)
- Fixed build error relating to a systemd/user dir

  + dmorgan <dmorgan>
    - Fix unown folders

* Fri Jan 20 2012 colin <colin> 38-8.mga2
+ Revision: 198517
- Apply various upstream patches
- Add a work around for a syslog.socket deadlock on boot+shutdown

* Thu Jan 19 2012 dmorgan <dmorgan> 38-7.mga2
+ Revision: 198249
- Add a filetrigger to reload systemd when a service is updated

* Wed Jan 18 2012 dmorgan <dmorgan> 38-6.mga2
+ Revision: 197873
- Add syslog.service in %%post ( from fedora)
- Add syslog fragment

* Mon Jan 16 2012 tmb <tmb> 38-4.mga2
+ Revision: 196777
- adjust sysvinit provides so it has higher rel than current sysvinit

* Sun Jan 15 2012 blino <blino> 38-3.mga2
+ Revision: 196288
- require coreutils, grep and awk for systemd-units post scriptlet

* Fri Jan 13 2012 wally <wally> 38-2.mga2
+ Revision: 195720
- fix libgee BR

* Fri Jan 13 2012 dmorgan <dmorgan> 38-1.mga2
+ Revision: 195688
- New version 38

* Wed Dec 28 2011 dmorgan <dmorgan> 37-18.mga2
+ Revision: 188452
- Do not use systemd-sysv-convert anymore

* Mon Dec 19 2011 tv <tv> 37-17.mga2
+ Revision: 184320
- rebuild for partial build
- move systemd-sysv-convert into systemd-tools in order to unbloat minimal install
  (it requires python)

* Thu Dec 15 2011 colin <colin> 37-15.mga2
+ Revision: 182053
- Do not start getty on tty1, it's used for X11 now (mga#3430)

* Sun Dec 11 2011 lmenut <lmenut> 37-14.mga2
+ Revision: 180654
- add BuildRequires: gettext-devel, as intltool does not require it anymore
- systemd-analyze requires python-dbus & python-cairo

* Mon Nov 28 2011 colin <colin> 37-13.mga2
+ Revision: 173732
- * Fix hostname script (can't use spaces after =)
  * Tidy up variable names and mask any errors in reading files in hostname script

* Mon Nov 28 2011 dmorgan <dmorgan> 37-12.mga2
+ Revision: 173684
- Do not set hostname at first install only but always check if one is set even on upgrade

* Thu Nov 10 2011 dmorgan <dmorgan> 37-11.mga2
+ Revision: 166164
- Fix logic in %%post units

* Wed Nov 09 2011 dmorgan <dmorgan> 37-10.mga2
+ Revision: 165935
- migrate hostname from old init process
- Do not disable hwclock-load.service it does not exist anymore
- Do not enable hwclock-load.service it does not exist anymore

* Fri Nov 04 2011 colin <colin> 37-9.mga2
+ Revision: 162696
- Change how prefdm.service works (more similar to Fedora)

* Mon Oct 31 2011 colin <colin> 37-8.mga2
+ Revision: 160471
- Conflict with sysvinit properly via careful capitalisation.

* Sun Oct 30 2011 blino <blino> 37-7.mga2
+ Revision: 159891
- fix broken conflicts and provides, use version-rel, not rel-rel...
  this should make sysvinit installable again

* Sat Oct 29 2011 dmorgan <dmorgan> 37-6.mga2
+ Revision: 159654
- Rebuild to push in core media
- Fix TARGET_MAGEIA instead of TARGET_MANDRIVA

* Sat Oct 29 2011 colin <colin> 37-5.mga2
+ Revision: 159642
- Update Mageia support patch
- * Remove the parsing of /etc/mageia-release and depend on os-release
- * Link dm.service to prefdm.service to mask sysvinit version
- * Remove dependance on syslog.service as this is handled internally
- Do not own /etc/os-release (this should be in a different package)
- Remove some unneeded patches
- Add some annotations to patches to indicate where they are going (upstream/drop etc) in the future.

* Tue Oct 25 2011 dmorgan <dmorgan> 37-4.mga2
+ Revision: 158036
- Add polkit as requires in the gtk subpackage
- Include systemd-sysv-convert (Fedora )
- Own more files ( from fedora)
- Own more files
  Use rpm macro for /etc

* Sat Oct 22 2011 colin <colin> 37-3.mga2
+ Revision: 157408
- Cherry-pick some upstream patches.
- Add various patches from Mandriva.
- Do not remove units and take over several tasks from initscripts

* Mon Oct 17 2011 colin <colin> 37-2.mga2
+ Revision: 155702
- Fixup directory ownership and include some (deliberately) empty directories

  + guillomovitch <guillomovitch>
    - redundant with autoreconf usage
    - implicit build dependencies

* Wed Oct 12 2011 dmorgan <dmorgan> 37-1.mga2
+ Revision: 154059
- New version 37

* Sun Oct 09 2011 dmorgan <dmorgan> 36-1.mga2
+ Revision: 153503
- New version 36

* Wed Sep 28 2011 ovitters <ovitters> 35-5.mga2
+ Revision: 149939
- fix conflicts of devel,tool subpackages

  + dmorgan <dmorgan>
    - Requires nss-myhostname

* Mon Sep 19 2011 tv <tv> 35-4.mga2
+ Revision: 145664
- bump release
- split out systemd-analyze in systemd-tools since it requires python
  (saves 30mb in minimal basesystem)
  also do not pulls pkgconfig in minimal basesystem

* Fri Sep 09 2011 dmorgan <dmorgan> 35-3.mga2
+ Revision: 141908
- Comment non working command (need debugging)
- Remove rpm macro, will be in rpm-setup

* Fri Sep 09 2011 dmorgan <dmorgan> 35-2.mga2
+ Revision: 141666
- add macros.systemd file for %%{_unitdir}

* Thu Sep 08 2011 dmorgan <dmorgan> 35-1.mga2
+ Revision: 141393
- New version 35
- Add some configuration file
  Add %%post with default commands ( ex: systemd-machine-id-setup )
- Add upstream patches to fix build ( tpg )
  Add gperf as Buildrequire
- Remove old source
- Fix mageia detection
- Specify the distro
- Rediff patch13
- New version 32
  Rediff Mageia support patch
  fix file lists ( based on eugeni work )

  + colin <colin>
    - New version: 34

* Fri Jul 15 2011 colin <colin> 30-2.mga2
+ Revision: 124435
- Fixup systemd Mageia support patch
  o Use tabs rather than spaces in Makefile (otherwise it chokes)
  o Fix a TARGET_MANDRIVA -> TARGET_MAGEIA leftover.
  o Fix a define handling leftover in service.c

  + dmorgan <dmorgan>
    - Add mageia support in systemd

* Fri Jul 15 2011 dmorgan <dmorgan> 30-1.mga2
+ Revision: 124355
- Fix udev buildrequire version
- Rebuild against new libnotify

  + eugeni <eugeni>
    - We need /run to use systemd properly.
    - Updated to systemd 30

  + mikala <mikala>
    - Add patch14 so systemd can build with vala 0.12

* Thu Feb 17 2011 dmorgan <dmorgan> 18-1.mga1
+ Revision: 52867
- Fix file list
- New version
  Remove patch15: Merged upstream

* Sat Feb 12 2011 spuhler <spuhler> 17-2.mga1
+ Revision: 51174
- initial import
- removed Patch14:	systemd-17-hwclock-hctosys.patch
  added Patch15:	systemd-17-fix-cgroup.patch
- added patch 14
- added Requires: systemd-units = %%{EVRD}
  added +Patch14:   systemd-17-hwclock-hctosys.patch
- removed buildroot definition from .spec
  put buildrequires each in one line

  + dmorgan <dmorgan>
    - Use fedora as distro name as mageia is not yet defined
    - Fix distro name
    - Merge mdv commit 634092
    - New version 17
    - Remove old binaries
    - Sync with mdv

* Mon Jan 17 2011 blino <blino> 15-5.mga1
+ Revision: 21515
- adapt requires
- rename /etc/release patch
- use /etc/release file
- imported package systemd