Accepting request 839494 from home:dimstar:Factory

Resubmit post review

OBS-URL: https://build.opensuse.org/request/show/839494
OBS-URL: https://build.opensuse.org/package/show/shells/bash-completion?expand=0&rev=120
This commit is contained in:
Dr. Werner Fink 2020-10-05 09:15:23 +00:00 committed by Git OBS Bridge
parent 0deb71e5c4
commit 52f2ee18c4
6 changed files with 60 additions and 2042 deletions

4
_multibuild Normal file
View File

@ -0,0 +1,4 @@
<multibuild>
<flavor>doc</flavor>
</multibuild>

File diff suppressed because it is too large Load Diff

View File

@ -1,90 +0,0 @@
#
# spec file for package bash-completion-doc
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _name bash-completion
# WARNING: Never edit this file!!! Edit bash-completion.spec and call pre_checkin.sh to update bash-completion-doc.spec.
# Always set %%build_doc to 0 before submit to OBS.
Name: bash-completion-doc
Version: 2.11
Release: 0
Summary: The Documentation of Programmable Completion for Bash
License: GPL-2.0-or-later
URL: https://github.com/scop/bash-completion/
Source0: https://github.com/scop/bash-completion/releases/download/%{version}/%{_name}-%{version}.tar.xz
Source1: bash-completion-rpmlintrc
# PATCH-FIX-UPSTREAM bnc#717151 -- Terminal tab autocompletion error
Patch0: %{_name}-2.4.patch
# PATCH-FIX-SUSE bnc#1012212 -- bash tab-autocompletion hangs on TAR-archiving with --create key
Patch1: tar-completion.patch
# PATCH-FIX-SUSE bnc#903362 -- tab completion for file names prints error
Patch2: PS1-completion-boo903362.patch
# PATCH-FIX-SUSE boo#905348 -- tab completion with shell variable changes command line with backslash
Patch3: FOO-dir-completion-boo905348.patch
# PATCH-FIX-SUSE
Patch4: qdbus-qt5.patch
# PATCH-FIX-SUSE boo#889319
Patch5: ls-completion-boo889319.patch
# PATCH-FIX-SUSE boo#940835
Patch6: backtick-completion-boo940835.patch
# PATCH-FIX-SUSE bsc#946875
Patch7: LVM-completion-bsc946875.patch
# PATCH-FIX-SUSE boo#940837, bsc#959299
Patch8: respect-variables-boo940837.patch
# PATCH-FIX-SUSE boo#958462
Patch9: rm-completion-smart-boo958462.patch
# PATCH-FIX-SUSE boo#963140
Patch10: backticks-bsc963140.patch
# PATCH-FIX-SUSE boo#1090515
Patch11: bash-completion-2.7-unRAR-remove.patch
# PATCH-FIX-SUSE boo#1167952
Patch12: bash-completion-fix-missing-directory-completion-with-filename-pattern.patch
BuildRequires: asciidoc
BuildRequires: libxslt-tools
BuildRequires: pkgconfig
Provides: bash-completion:%{_defaultdocdir}/%{_name}/AUTHORS
BuildArch: noarch
%description
This package contains the package documentation file of the
package bash-completion.
%prep
%autosetup -p1 -n %{_name}-%{version}
%build
%configure
pushd doc
mkdir html
a2x -D html -d book -f xhtml --asciidoc-opts="--unsafe" main.txt
popd
%install
pushd doc
mkdir -p %{buildroot}%{_defaultdocdir}/%{_name}/html
install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{_name}/html/
popd
install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/%{_name}/
install -m 0644 README.md %{buildroot}%{_defaultdocdir}/%{_name}/README
%files
%dir %{_defaultdocdir}/%{_name}
%{_defaultdocdir}/%{_name}/AUTHORS
%{_defaultdocdir}/%{_name}/README
%{_defaultdocdir}/%{_name}/html/
%changelog

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Sep 28 15:32:10 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Convert to _multibuild. The pre_checkin.sh script was quite
broken anyway and it was less effort to convert than to try to
fix that one.
-------------------------------------------------------------------
Mon Sep 28 14:37:58 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Do not BuildRequire util-linux: there is no need to have this in
the build root.
- Drop cmake BuildRequires: this is only here for the
/usr/share/cmake directory ownership, which in turn even causes
problems of left-over directories (e.g. install bash-completion,
on a system without cmake, uninstall bash-completion,
/usr/share/cmake remains left on the disk).
-------------------------------------------------------------------
Tue Aug 18 23:13:19 UTC 2020 - Matthias Eliasson <elimat@opensuse.org>

View File

@ -16,21 +16,34 @@
#
# WARNING: After editing this file please call pre_checkin.sh to update bash-completion-doc.spec.
# Do not change %%build_core.
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "doc"
%define build_core 0
%define build_doc 1
%define nsuffix -doc
%else
%define build_core 1
# Always set %%build_doc to 0 before submit to OBS.
%define build_doc 0
Name: bash-completion
%endif
%global _name bash-completion
Name: %{_name}%{?nsuffix}
Version: 2.11
Release: 0
%if %{build_core}
Summary: Programmable Completion for Bash
License: GPL-2.0-or-later
%else
Summary: The Documentation of Programmable Completion for Bash
License: GPL-2.0-or-later
Provides: bash-completion:%{_defaultdocdir}/%{_name}/AUTHORS
%endif
URL: https://github.com/scop/bash-completion/
Source0: https://github.com/scop/bash-completion/releases/download/%{version}/%{name}-%{version}.tar.xz
Source0: https://github.com/scop/bash-completion/releases/download/%{version}/%{_name}-%{version}.tar.xz
Source1: bash-completion-rpmlintrc
# PATCH-FIX-UPSTREAM bnc#717151 -- Terminal tab autocompletion error
Patch0: %{name}-2.4.patch
Patch0: %{_name}-2.4.patch
# PATCH-FIX-SUSE bnc#1012212 -- bash tab-autocompletion hangs on TAR-archiving with --create key
Patch1: tar-completion.patch
# PATCH-FIX-SUSE bnc#903362 -- tab completion for file names prints error
@ -63,12 +76,14 @@ BuildRequires: asciidoc
BuildRequires: libxslt-tools
%endif
%if %{build_core}
BuildRequires: cmake
BuildRequires: util-linux
Requires: bash
%endif
%if %{build_core}
%description
%if %{build_doc}
This package contains the package documentation file of the
package bash-completion.
%else
bash-completion is a collection of shell functions that take advantage
of the programmable completion feature of Bash 2.04 and later.
@ -79,23 +94,10 @@ Provides: bash-completion:%{_datadir}/pkgconfig/bash-completion.pc
%description devel
This package contains the package configuration file of the
package bash-completion.
%endif
%if %{build_doc}
%package doc
Summary: The Documentation of Programmable Completion for Bash
Provides: bash-completion:%{_defaultdocdir}/%{name}/AUTHORS
BuildArch: noarch
%description doc
This package contains the package documentation file of the
package bash-completion.
%endif
%prep
%autosetup -p1
%autosetup -p1 -n %{_name}-%{version}
%build
autoreconf -fiv
@ -125,18 +127,12 @@ rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hexdump
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/hwclock
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/ionice
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/look
if test -e %{_datadir}/bash-completion/completions/mount
then
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/mount
fi
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/mount
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/newgrp
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/renice
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/rtcwake
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/su
if test -e %{_datadir}/bash-completion/completions/umount
then
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount
fi
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/umount
# shipping in devscripts now
rm -vf %{buildroot}%{_datadir}/bash-completion/completions/bts
# Seems to be broken (boo#1161136)
@ -144,22 +140,23 @@ rm -vf %{buildroot}%{_datadir}/bash-completion/completions/_adb
%endif
%if %{build_doc}
pushd doc
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}/html
install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{name}/html/
mkdir -p %{buildroot}%{_defaultdocdir}/%{_name}/html
install -m 0644 html/* %{buildroot}%{_defaultdocdir}/%{_name}/html/
popd
install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/%{name}/
install -m 0644 README.md %{buildroot}%{_defaultdocdir}/%{name}/README
install -m 0644 AUTHORS %{buildroot}%{_defaultdocdir}/%{_name}/
install -m 0644 README.md %{buildroot}%{_defaultdocdir}/%{_name}/README
%endif
%if %{build_core}
%files
%if "%{flavor}" == "doc"
%dir %{_defaultdocdir}/%{_name}
%{_defaultdocdir}/%{_name}/AUTHORS
%{_defaultdocdir}/%{_name}/README
%{_defaultdocdir}/%{_name}/html/
%else
%license COPYING
%if %{build_doc}
%exclude %{_defaultdocdir}/%{name}/AUTHORS
%exclude %{_defaultdocdir}/%{name}/README
%exclude %{_defaultdocdir}/%{name}/html/
%endif
%{_datadir}/bash-completion
%dir %{_datadir}/cmake
%{_datadir}/cmake/bash-completion
%config %{_sysconfdir}/profile.d/bash_completion.sh
@ -169,16 +166,6 @@ install -m 0644 README.md %{buildroot}%{_defaultdocdir}/%{name}/README
# It would cause failure of directory ownership check.
# Own this directory to prevent it.
%dir %{_datadir}/bash-completion
%endif
%if %{build_doc}
%files doc
%dir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}/AUTHORS
%{_defaultdocdir}/%{name}/README
%{_defaultdocdir}/%{name}/html/
%endif
%changelog

View File

@ -1,42 +0,0 @@
#!/bin/sh
if test bash-completion.spec -ot bash-completion-doc.spec ; then
echo "bash-completion.spec is older than bash-completion-doc.spec. Please merge changes manually and call pre-checkin.sh again."
exit 1
fi
if test bash-completion.changes -ot bash-completion-doc.changes ; then
echo "bash-completion.changes is older than bash-completion-doc.changes. Please merge changes manually and call pre-checkin.sh again."
exit 1
fi
SUMMARY_DOC="$(sed -n '/^%package doc/,/^%description doc/{/^Summary:/p;}' bash-completion.spec)"
GROUP_DOC="$(sed -n '/^%package doc/,/^%description doc/{/^Group:/p;}' bash-completion.spec)"
sed '
s/spec file for package bash-completion/spec file for package bash-completion-doc/;
/^Name:/s/bash-completion/bash-completion-doc/;
s/WARNING: After editing this file please/WARNING: Never edit this file!!! Edit bash-completion.spec and/;
s/%{name}/%{_name}/g;
s@^Summary:.*$@'"$SUMMARY_DOC"'@
s@^Group:.*$@'"$GROUP_DOC"'@
/^%package doc/,/^%description doc/{/^Summary:/d;/^Group:/d;}
s/^%setup -q$/%setup -q -n %{_name}-%{version}/
/^# Do not change %%build_core./d
/## Always set %%build_doc/d
/^Name:/a %define _name bash-completion
/^%define build_core/d
/^%define build_doc/d
/^%if %build_core$/,/^%endif %build_core$/d
/^%if %build_doc$/d
/^%endif %build_doc$/d
/^%package doc$/d
s/^%\(description\|files\) doc$/%\1/
/^$/H
# Delete trailing dual empty line as it causes overwritting by spec formatter:
\:^%{_defaultdocdir}/%{_name}/html/:,/^%changelog/{/^$/H;/^$/D;\:^%{_defaultdocdir}/%{_name}/html/:a
}
' <bash-completion.spec >bash-completion-doc.spec
cp -a bash-completion.changes bash-completion-doc.changes
touch bash-completion.spec bash-completion.changes