SHA256
1
0
forked from pool/systemd

Accepting request 440233 from home:fbui:systemd:Factory

- specfile: conflict systemd-bash-completion and systemd-mini-bash-completion
  Otherwise the build system detects that systemd-bash-completion and
  its mini variant are conflicting at files level even though those
  packages can't be installed on the same system.

- specfile: clean up nss-* plugins descriptions and drop
  nss-myhostname-config script for now.
  Currently /etc/nsswitch.conf is supposed to be edited by the
  sysadmin to enable the modules. However for some reasons only
  nss-myhostname is removed from the conf file when the corresponding
  package is uninstalled. This is inconsistent so let's remove it.
  Actually I'm wondering if we shouldn't make those NSS plugins part
  of the main package and get rid of all those sub-packages...

- specfile: remove old comments and unneeded sed command

- specfile: no need to create systemd-update-utmp-runlevel.service symlinks anymore
  The symlinks in /usr/lib/systemd/system/<target>.target.wants/systemd-update-utmp-runlevel.service
  are created in Makefile.am since commit d5d8429a12c4b1.
  'reboot' and 'poweroff' targets initially had the symlinks but
  there's not point since the latter conflicts shutdown.target whereas
  the 2 targets pull it in.
  See: https://github.com/systemd/systemd/pull/4429

- specfile: remove the following warnings:
  [  256s] warning: File listed twice: /usr/lib/systemd/system/dbus.target.wants
  [  256s] warning: File listed twice: /usr/lib/systemd/system/default.target.wants

OBS-URL: https://build.opensuse.org/request/show/440233
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=961
This commit is contained in:
Thomas Blume 2016-11-14 14:35:07 +00:00 committed by Git OBS Bridge
parent 8a8167682e
commit 866de3afab
5 changed files with 168 additions and 173 deletions

View File

@ -1,31 +0,0 @@
#!/bin/bash
# sed calls copied from fedora package
set -e
case "$1" in
--help)
echo "$0 [--enable|--disable]"
exit 0
;;
--enable)
sed -i.bak -e '
/^hosts:/ !b
/\<myhostname\>/ b
s/[[:blank:]]*$/ myhostname/
' /etc/nsswitch.conf
;;
--disable)
sed -i.bak -e '
/^hosts:/ !b
s/[[:blank:]]\+myhostname\>//
' /etc/nsswitch.conf
;;
"")
if grep -q "^hosts:.*\<myhostname\>" /etc/nsswitch.conf; then
echo "enabled"
else
echo "disabled"
fi
;;
*) echo "invalid argument $1"; exit 1 ;;
esac

View File

@ -1,3 +1,53 @@
-------------------------------------------------------------------
Mon Nov 14 12:27:56 UTC 2016 - fbui@suse.com
- specfile: conflict systemd-bash-completion and systemd-mini-bash-completion
Otherwise the build system detects that systemd-bash-completion and
its mini variant are conflicting at files level even though those
packages can't be installed on the same system.
-------------------------------------------------------------------
Thu Nov 10 19:11:57 UTC 2016 - fbui@suse.com
- specfile: clean up nss-* plugins descriptions and drop
nss-myhostname-config script for now.
Currently /etc/nsswitch.conf is supposed to be edited by the
sysadmin to enable the modules. However for some reasons only
nss-myhostname is removed from the conf file when the corresponding
package is uninstalled. This is inconsistent so let's remove it.
Actually I'm wondering if we shouldn't make those NSS plugins part
of the main package and get rid of all those sub-packages...
-------------------------------------------------------------------
Thu Nov 10 18:22:04 UTC 2016 - fbui@suse.com
- specfile: remove old comments and unneeded sed command
-------------------------------------------------------------------
Thu Nov 10 14:54:22 UTC 2016 - fbui@suse.com
- specfile: no need to create systemd-update-utmp-runlevel.service symlinks anymore
The symlinks in /usr/lib/systemd/system/<target>.target.wants/systemd-update-utmp-runlevel.service
are created in Makefile.am since commit d5d8429a12c4b1.
'reboot' and 'poweroff' targets initially had the symlinks but
there's not point since the latter conflicts shutdown.target whereas
the 2 targets pull it in.
See: https://github.com/systemd/systemd/pull/4429
-------------------------------------------------------------------
Thu Nov 10 13:44:13 UTC 2016 - fbui@suse.com
- specfile: remove the following warnings:
[ 256s] warning: File listed twice: /usr/lib/systemd/system/dbus.target.wants
[ 256s] warning: File listed twice: /usr/lib/systemd/system/default.target.wants
-------------------------------------------------------------------
Wed Oct 26 09:41:01 UTC 2016 - fbui@suse.com

View File

@ -148,7 +148,6 @@ Source1: %{name}-rpmlintrc
Source3: systemd-sysv-convert
Source6: baselibs.conf
Source7: libgcrypt.m4
Source9: nss-myhostname-config
Source10: macros.systemd.upstream
Source11: after-local.service
Source12: systemd-sysv-install
@ -310,13 +309,13 @@ Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description -n nss-resolve
nss-resolve is a plug-in module for the GNU Name Service Switch (NSS)
functionality of the GNU C Library (glibc) enabling it to resolve host
names via the systemd-resolved(8) service (provided by the systemd
package).
This package contains a plug-in module for the Name Service Switch
(NSS), which enables host name resolutions via the systemd-resolved(8)
local network name resolution service. It replaces the nss-dns plug-in
module that traditionally resolves hostnames via DNS.
It replaces the nss-dns plug-in module that traditionally resolves
hostnames via DNS.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-resolve(8) manpage for more details.
%package -n nss-myhostname
Summary: Plugin for local system host name resolution
@ -324,26 +323,31 @@ License: LGPL-2.1+
Group: System/Libraries
%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
configured 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.
This package contains a plug-in module for the Name Service Switch
(NSS), primarly providing hostname resolution for the locally
configured system hostname as returned by gethostname(2). For example,
it resolves the local hostname to locally configured IP addresses, as
well as "localhost" to 127.0.0.1/::1.
Note that nss-myhostname only provides a workaround for broken
software. If nss-myhostname is trigged by an application a message
is logged to /var/log/messages. Please check whether that is worth
a bug report then.
This package marks the installation to not use syslog but only the journal.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-hostname(8) manpage for more details.
%endif
%if %{with machined}
%package -n nss-mymachines
Summary: Plugin for local virtual host name resolution
License: LGPL-2.1+
Group: System/Libraries
%description -n nss-mymachines
This package contains a plugin for the Name Service Switch (NSS),
providing host name resolution for all local containers and virtual
machines registered with systemd-machined to their respective IP
addresses. It also maps UID/GIDs ranges used by containers to useful
names.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-mymachines(8) manpage for more details.
%endif
%if %{with journal_remote}
@ -366,25 +370,15 @@ This package contains systemd-journal-gatewayd,
systemd-journal-remote, and systemd-journal-upload.
%endif
%if %{with machined}
%package -n nss-mymachines
Summary: Plugin for local virtual host name resolution
License: LGPL-2.1+
Group: System/Libraries
%description -n nss-mymachines
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 containers and virtual machines
systemd-machined knows about.
%endif
%package bash-completion
Summary: Bash completion support for systemd
License: LGPL-2.1+
Group: System/Base
Requires: bash-completion
BuildArch: noarch
%if 0%{?bootstrap}
Conflicts: systemd-bash-completion
%endif
%description bash-completion
Some systemd commands offer bash completion, but it is an optional dependency.
@ -400,14 +394,6 @@ echo "Checking whether upstream rpm macros changed..."
cp %{SOURCE7} m4/
%endif
#
# In combination with Patch352 set-and-use-default-logconsole.patch
# Ensure that journald log on tty10
#
%ifarch %ix86 x86_64 x32
sed -ri 's:#TTYPath=/dev/console:#TTYPath=/dev/tty10:' src/journal/journald.conf
%endif
%build
#
# Be sure that fresh build libudev is found and used at linkage time
@ -470,7 +456,6 @@ make %{?_smp_mflags} V=e
# move to %{_lib}
%if ! 0%{?bootstrap}
mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib}
install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config
%endif
# FIXME: these symlinks should die.
@ -518,11 +503,6 @@ cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf
sg
EOF
# 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
# systemd release and it's made clear how to get the core dumps out of the
# journal.
# do not ship sysctl defaults in systemd package, will be part of
# aaa_base (in procps for now)
rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf
@ -622,13 +602,6 @@ rm -f %{buildroot}/%{_prefix}/lib/rpm/macros.d/macros.systemd
rm -f %{buildroot}%{_prefix}/lib/systemd/system-preset/*.preset
echo 'disable *' >%{buildroot}%{_prefix}/lib/systemd/system-preset/99-default.preset
# 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
# Add entries for xkeyboard-config converted keymaps; mappings, which
# already exist in original systemd mapping table are being ignored
# though, i.e. not overwritten; needed as long as YaST uses console
@ -811,13 +784,6 @@ 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 || :
fi
%endif
%if ! 0%{?bootstrap}
%preun -n nss-myhostname
if [ "$1" -eq 0 -a -f /etc/nsswitch.conf ] ; then
%{_sbindir}/nss-myhostname-config --disable
fi
%post -n nss-myhostname -p /sbin/ldconfig
%postun -n nss-myhostname -p /sbin/ldconfig
@ -945,8 +911,6 @@ fi
%dir %{_prefix}/lib/systemd/ntp-units.d/
%dir %{_prefix}/lib/systemd/system-shutdown/
%dir %{_prefix}/lib/systemd/system-sleep/
%dir %{_prefix}/lib/systemd/system/default.target.wants
%dir %{_prefix}/lib/systemd/system/dbus.target.wants
%dir %{_prefix}/lib/systemd/system/getty@tty1.service.d
%dir %{_prefix}/lib/systemd/system/user@0.service.d
%{_prefix}/lib/systemd/system/getty@tty1.service.d/noclear.conf
@ -1248,7 +1212,6 @@ fi
%files -n nss-myhostname
%defattr(-, root, root)
/%{_lib}/*nss_myhostname*
%{_sbindir}/nss-myhostname-config
%{_mandir}/man8/libnss_myhostname.*
%{_mandir}/man8/nss-myhostname.*
%endif

View File

@ -1,3 +1,53 @@
-------------------------------------------------------------------
Mon Nov 14 12:27:56 UTC 2016 - fbui@suse.com
- specfile: conflict systemd-bash-completion and systemd-mini-bash-completion
Otherwise the build system detects that systemd-bash-completion and
its mini variant are conflicting at files level even though those
packages can't be installed on the same system.
-------------------------------------------------------------------
Thu Nov 10 19:11:57 UTC 2016 - fbui@suse.com
- specfile: clean up nss-* plugins descriptions and drop
nss-myhostname-config script for now.
Currently /etc/nsswitch.conf is supposed to be edited by the
sysadmin to enable the modules. However for some reasons only
nss-myhostname is removed from the conf file when the corresponding
package is uninstalled. This is inconsistent so let's remove it.
Actually I'm wondering if we shouldn't make those NSS plugins part
of the main package and get rid of all those sub-packages...
-------------------------------------------------------------------
Thu Nov 10 18:22:04 UTC 2016 - fbui@suse.com
- specfile: remove old comments and unneeded sed command
-------------------------------------------------------------------
Thu Nov 10 14:54:22 UTC 2016 - fbui@suse.com
- specfile: no need to create systemd-update-utmp-runlevel.service symlinks anymore
The symlinks in /usr/lib/systemd/system/<target>.target.wants/systemd-update-utmp-runlevel.service
are created in Makefile.am since commit d5d8429a12c4b1.
'reboot' and 'poweroff' targets initially had the symlinks but
there's not point since the latter conflicts shutdown.target whereas
the 2 targets pull it in.
See: https://github.com/systemd/systemd/pull/4429
-------------------------------------------------------------------
Thu Nov 10 13:44:13 UTC 2016 - fbui@suse.com
- specfile: remove the following warnings:
[ 256s] warning: File listed twice: /usr/lib/systemd/system/dbus.target.wants
[ 256s] warning: File listed twice: /usr/lib/systemd/system/default.target.wants
-------------------------------------------------------------------
Wed Oct 26 09:41:01 UTC 2016 - fbui@suse.com

View File

@ -146,7 +146,6 @@ Source1: %{name}-rpmlintrc
Source3: systemd-sysv-convert
Source6: baselibs.conf
Source7: libgcrypt.m4
Source9: nss-myhostname-config
Source10: macros.systemd.upstream
Source11: after-local.service
Source12: systemd-sysv-install
@ -308,13 +307,13 @@ Group: System/Libraries
Requires: %{name} = %{version}-%{release}
%description -n nss-resolve
nss-resolve is a plug-in module for the GNU Name Service Switch (NSS)
functionality of the GNU C Library (glibc) enabling it to resolve host
names via the systemd-resolved(8) service (provided by the systemd
package).
This package contains a plug-in module for the Name Service Switch
(NSS), which enables host name resolutions via the systemd-resolved(8)
local network name resolution service. It replaces the nss-dns plug-in
module that traditionally resolves hostnames via DNS.
It replaces the nss-dns plug-in module that traditionally resolves
hostnames via DNS.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-resolve(8) manpage for more details.
%package -n nss-myhostname
Summary: Plugin for local system host name resolution
@ -322,26 +321,31 @@ License: LGPL-2.1+
Group: System/Libraries
%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
configured 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.
This package contains a plug-in module for the Name Service Switch
(NSS), primarly providing hostname resolution for the locally
configured system hostname as returned by gethostname(2). For example,
it resolves the local hostname to locally configured IP addresses, as
well as "localhost" to 127.0.0.1/::1.
Note that nss-myhostname only provides a workaround for broken
software. If nss-myhostname is trigged by an application a message
is logged to /var/log/messages. Please check whether that is worth
a bug report then.
This package marks the installation to not use syslog but only the journal.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-hostname(8) manpage for more details.
%endif
%if %{with machined}
%package -n nss-mymachines
Summary: Plugin for local virtual host name resolution
License: LGPL-2.1+
Group: System/Libraries
%description -n nss-mymachines
This package contains a plugin for the Name Service Switch (NSS),
providing host name resolution for all local containers and virtual
machines registered with systemd-machined to their respective IP
addresses. It also maps UID/GIDs ranges used by containers to useful
names.
To activate this NSS module, you will need to include it in
/etc/nsswitch.conf, see nss-mymachines(8) manpage for more details.
%endif
%if %{with journal_remote}
@ -364,25 +368,15 @@ This package contains systemd-journal-gatewayd,
systemd-journal-remote, and systemd-journal-upload.
%endif
%if %{with machined}
%package -n nss-mymachines
Summary: Plugin for local virtual host name resolution
License: LGPL-2.1+
Group: System/Libraries
%description -n nss-mymachines
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 containers and virtual machines
systemd-machined knows about.
%endif
%package bash-completion
Summary: Bash completion support for systemd
License: LGPL-2.1+
Group: System/Base
Requires: bash-completion
BuildArch: noarch
%if 0%{?bootstrap}
Conflicts: systemd-bash-completion
%endif
%description bash-completion
Some systemd commands offer bash completion, but it is an optional dependency.
@ -398,14 +392,6 @@ echo "Checking whether upstream rpm macros changed..."
cp %{SOURCE7} m4/
%endif
#
# In combination with Patch352 set-and-use-default-logconsole.patch
# Ensure that journald log on tty10
#
%ifarch %ix86 x86_64 x32
sed -ri 's:#TTYPath=/dev/console:#TTYPath=/dev/tty10:' src/journal/journald.conf
%endif
%build
#
# Be sure that fresh build libudev is found and used at linkage time
@ -468,7 +454,6 @@ make %{?_smp_mflags} V=e
# move to %{_lib}
%if ! 0%{?bootstrap}
mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib}
install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config
%endif
# FIXME: these symlinks should die.
@ -516,11 +501,6 @@ cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf
sg
EOF
# 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
# systemd release and it's made clear how to get the core dumps out of the
# journal.
# do not ship sysctl defaults in systemd package, will be part of
# aaa_base (in procps for now)
rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf
@ -620,13 +600,6 @@ rm -f %{buildroot}/%{_prefix}/lib/rpm/macros.d/macros.systemd
rm -f %{buildroot}%{_prefix}/lib/systemd/system-preset/*.preset
echo 'disable *' >%{buildroot}%{_prefix}/lib/systemd/system-preset/99-default.preset
# 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
# Add entries for xkeyboard-config converted keymaps; mappings, which
# already exist in original systemd mapping table are being ignored
# though, i.e. not overwritten; needed as long as YaST uses console
@ -809,13 +782,6 @@ 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 || :
fi
%endif
%if ! 0%{?bootstrap}
%preun -n nss-myhostname
if [ "$1" -eq 0 -a -f /etc/nsswitch.conf ] ; then
%{_sbindir}/nss-myhostname-config --disable
fi
%post -n nss-myhostname -p /sbin/ldconfig
%postun -n nss-myhostname -p /sbin/ldconfig
@ -943,8 +909,6 @@ fi
%dir %{_prefix}/lib/systemd/ntp-units.d/
%dir %{_prefix}/lib/systemd/system-shutdown/
%dir %{_prefix}/lib/systemd/system-sleep/
%dir %{_prefix}/lib/systemd/system/default.target.wants
%dir %{_prefix}/lib/systemd/system/dbus.target.wants
%dir %{_prefix}/lib/systemd/system/getty@tty1.service.d
%dir %{_prefix}/lib/systemd/system/user@0.service.d
%{_prefix}/lib/systemd/system/getty@tty1.service.d/noclear.conf
@ -1246,7 +1210,6 @@ fi
%files -n nss-myhostname
%defattr(-, root, root)
/%{_lib}/*nss_myhostname*
%{_sbindir}/nss-myhostname-config
%{_mandir}/man8/libnss_myhostname.*
%{_mandir}/man8/nss-myhostname.*
%endif