From 6e4576339998c044762bc7bd7625954d79f1624ff1c2de43f0fc3ddb47a2e6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Mon, 14 Aug 2017 07:54:31 +0000 Subject: [PATCH] Accepting request 516582 from home:jengelh:branches:systemsmanagement:saltstack - Run fdupes over all of /usr because it still warns about duplicate files. Remove ancient suse_version > 1020 conditional. - Replace unnecessary %__ indirections. Use grep -q in favor of >/dev/null. - Avoid bashisms in %pre. OBS-URL: https://build.opensuse.org/request/show/516582 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=93 --- salt.changes | 9 +++++++++ salt.spec | 31 ++++++++++++++----------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/salt.changes b/salt.changes index ddc431b..554521c 100644 --- a/salt.changes +++ b/salt.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Aug 12 21:26:49 UTC 2017 - jengelh@inai.de + +- Run fdupes over all of /usr because it still warns about + duplicate files. Remove ancient suse_version > 1020 conditional. +- Replace unnecessary %__ indirections. Use grep -q in favor of + >/dev/null. +- Avoid bashisms in %pre. + ------------------------------------------------------------------- Fri Jul 21 12:53:26 UTC 2017 - bmaryniuk@suse.com diff --git a/salt.spec b/salt.spec index 88e6a26..58271c7 100644 --- a/salt.spec +++ b/salt.spec @@ -1,7 +1,7 @@ # # spec file for package salt # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -50,6 +50,7 @@ Source4: update-documentation.sh Source5: travis.yml BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: fdupes BuildRequires: logrotate BuildRequires: python BuildRequires: python-devel @@ -83,9 +84,6 @@ BuildRequires: python-xml %if %{with builddocs} BuildRequires: python-sphinx %endif -%if 0%{?suse_version} > 1020 -BuildRequires: fdupes -%endif Requires(pre): %{_sbindir}/groupadd Requires(pre): %{_sbindir}/useradd @@ -101,8 +99,8 @@ Requires(pre): dbus-1 Requires(pre): dbus %endif -Requires: procps Requires: logrotate +Requires: procps Requires: python # %if ! 0%{?suse_version} > 1110 @@ -110,13 +108,13 @@ Requires: python-certifi %endif # requirements/base.txt %if 0%{?rhel} -Requires: python-jinja2 -Requires: yum +Requires: python-jinja2 +Requires: yum %if 0%{?rhel} == 6 -Requires: yum-plugin-security +Requires: yum-plugin-security %endif %else -Requires: python-Jinja2 +Requires: python-Jinja2 %endif Requires: python-futures >= 2.0 Requires: python-markupsafe @@ -395,7 +393,7 @@ cp %{S:5} ./.travis.yml # extract docs from the tarball mkdir -p doc/_build pushd doc/_build/ -tar xfv %{S:3} +tar -xvf %{S:3} popd %endif @@ -448,15 +446,15 @@ install -Dd -m 0750 %{buildroot}%{_sysconfdir}/salt/pki/minion ## Install Zypper plugins only on SUSE machines %if 0%{?suse_version} install -Dd -m 0750 %{buildroot}%{_prefix}/lib/zypp/plugins/commit -%{__install} scripts/suse/zypper/plugins/commit/zyppnotify %{buildroot}%{_prefix}/lib/zypp/plugins/commit/zyppnotify +install scripts/suse/zypper/plugins/commit/zyppnotify %{buildroot}%{_prefix}/lib/zypp/plugins/commit/zyppnotify %endif # Install Yum plugins only on RH machines %if 0%{?fedora} || 0%{?rhel} install -Dd %{buildroot}%{_prefix}/share/yum-plugins install -Dd %{buildroot}/etc/yum/pluginconf.d -%{__install} scripts/suse/yum/plugins/yumnotify.py %{buildroot}%{_prefix}/share/yum-plugins -%{__install} scripts/suse/yum/plugins/yumnotify.conf %{buildroot}/etc/yum/pluginconf.d +install scripts/suse/yum/plugins/yumnotify.py %{buildroot}%{_prefix}/share/yum-plugins +install scripts/suse/yum/plugins/yumnotify.conf %{buildroot}/etc/yum/pluginconf.d %endif ## install init and systemd scripts @@ -527,8 +525,7 @@ install -Dpm 0644 pkg/fish-completions/* %{buildroot}%{fish_completions_dir} %endif %if 0%{?suse_version} > 1020 -%fdupes %{buildroot}%{_docdir} -%fdupes %{buildroot}%{python_sitelib} +%fdupes %{buildroot}/%{_prefix} %endif %check @@ -539,10 +536,10 @@ python setup.py test --runtests-opts=-u %pre S_HOME="/var/lib/salt" S_PHOME="/srv/salt" -getent passwd salt | grep $S_PHOME >/dev/null && usermod -d $S_HOME salt +getent passwd salt | grep -q $S_PHOME && usermod -d $S_HOME salt getent group salt >/dev/null || %{_sbindir}/groupadd -r salt getent passwd salt >/dev/null || %{_sbindir}/useradd -r -g salt -d $S_HOME -s /bin/false -c "salt-master daemon" salt -if [[ -d "$S_PHOME/.ssh" ]]; then +if [ -d "$S_PHOME/.ssh" ]; then mv $S_PHOME/.ssh $S_HOME fi