SHA256
1
0
forked from pool/quilt

4 Commits

Author SHA256 Message Date
819b5349fc Accepting request 1273478 from devel:tools:scm
- Update to upstream version 0.69.
- Make it possible to run "quilt setup" on a spec file which excludes the local architecture (boo#1238516).

OBS-URL: https://build.opensuse.org/request/show/1273478
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quilt?expand=0&rev=79
2025-04-30 17:03:29 +00:00
Jean Delvare
c9cce0c0ed - Update to version 0.69:
* Fix escaping of % and backslash in patch names
  * new: Stop claiming support of option -p ab
  * patches: Several performance optimizations
  * series: Simplify the code
  * Obsoletes fix-two-exit-values.patch
  * Obsoletes guards-fix-exit-operator-precedence-error.patch
  * Obsoletes inspect-wrapper-fix-rpm-4.20.patch
  * Obsoletes setup-implement-a-spec-filter-library.patch
  * Obsoletes setup-new-option-spec-filter.patch
  * Obsoletes setup-pass-define-to-rpmbuild-instead-of-eval-define.patch
- setup-deal-with-ExclusiveArch.patch: Make it possible to run
  "quilt setup" on a spec file which excludes the local
  architecture (boo#1238516).

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=138
2025-04-29 13:28:00 +00:00
89831a70e9 Accepting request 1253876 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1253876
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quilt?expand=0&rev=78
2025-03-17 21:19:17 +00:00
Jean Delvare
6fc10e5a7d Accepting request 1253869 from home:jdelvare:branches:devel:tools:scm
- Fix 2 bugs in "quilt setup" caused by the update to rpm 4.20 (boo#1236907).
- New "quilt setup" option to preprocess spec files which do not comply with the standard (boo#1236907).
- Install the bash completion file to the right directory (reported by rpmlint).

OBS-URL: https://build.opensuse.org/request/show/1253869
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=136
2025-03-17 16:33:13 +00:00
6 changed files with 126 additions and 39 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa4f3f1ddcdbd135bfd99df26159a1fe65a1d6b571afb5b063995184c490eaa3
size 468692

3
quilt-0.69.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:000ec454d659d09d98e4847ec1448140ba8cc14f2f9028d1ee95ea31e7683c51
size 469476

View File

@@ -1,3 +1,46 @@
-------------------------------------------------------------------
Tue Apr 29 12:28:28 UTC 2025 - Jean Delvare <jdelvare@suse.com>
- Update to version 0.69:
* Fix escaping of % and backslash in patch names
* new: Stop claiming support of option -p ab
* patches: Several performance optimizations
* series: Simplify the code
* Obsoletes fix-two-exit-values.patch
* Obsoletes guards-fix-exit-operator-precedence-error.patch
* Obsoletes inspect-wrapper-fix-rpm-4.20.patch
* Obsoletes setup-implement-a-spec-filter-library.patch
* Obsoletes setup-new-option-spec-filter.patch
* Obsoletes setup-pass-define-to-rpmbuild-instead-of-eval-define.patch
- setup-deal-with-ExclusiveArch.patch: Make it possible to run
"quilt setup" on a spec file which excludes the local
architecture (boo#1238516).
-------------------------------------------------------------------
Mon Mar 17 15:27:54 UTC 2025 - Jean Delvare <jdelvare@suse.com>
- Drop obsolete suse version checks (reported by rpmlint).
-------------------------------------------------------------------
Mon Mar 17 14:34:07 UTC 2025 - Jean Delvare <jdelvare@suse.com>
- guards-fix-exit-operator-precedence-error.patch,
fix-two-exit-values.patch: Avoid a perl warning due to missing
parentheses when using the ?: operator to compute an exit value.
- setup-pass-define-to-rpmbuild-instead-of-eval-define.patch: Fix
building noarch packages with rpm >= 4.20 (boo#1236907).
- setup-new-option-spec-filter.patch,
setup-implement-a-spec-filter-library.patch: Make it possible to
preprocess spec files which do not comply with the standard. Most
notably multibuild OBS spec files need to be preprocessed. Use
option "--spec-filter=obs" for these (boo#1236907).
- inspect-wrapper-fix-rpm-4.20.patch: Detect the change of build
root path hierarchy introduced by rpm 4.20 (boo#1236907).
- Drop suse-workaround-pseudo-release.patch, superseded by new
option --spec-filter.
- Install the bash completion file to the right directory (reported
by rpmlint).
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 28 13:37:03 UTC 2024 - Jean Delvare <jdelvare@suse.com> Thu Mar 28 13:37:03 UTC 2024 - Jean Delvare <jdelvare@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package quilt # spec file for package quilt
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,16 @@
Name: quilt Name: quilt
Version: 0.68 Version: 0.69
Release: 0 Release: 0
Summary: A Tool for Working with Many Patches Summary: A Tool for Working with Many Patches
License: GPL-2.0-or-later License: GPL-2.0-or-later
Group: Development/Tools/Version Control Group: Development/Tools/Version Control
BuildRequires: bash-completion-devel
BuildRequires: diffstat BuildRequires: diffstat
BuildRequires: ed BuildRequires: ed
BuildRequires: emacs-nox BuildRequires: emacs-nox
BuildRequires: pkg-config
BuildRequires: xz BuildRequires: xz
Requires: coreutils Requires: coreutils
Requires: diffstat Requires: diffstat
@@ -39,8 +41,8 @@ Requires: perl
URL: http://savannah.nongnu.org/projects/quilt URL: http://savannah.nongnu.org/projects/quilt
Source: %{name}-%{version}.tar.xz Source: %{name}-%{version}.tar.xz
Source1: suse-start-quilt-mode.el Source1: suse-start-quilt-mode.el
Patch1: setup-deal-with-ExclusiveArch.patch
Patch82: quilt-support-vimdiff.patch Patch82: quilt-support-vimdiff.patch
Patch84: suse-workaround-pseudo-release.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
%if 0%{?suse_version} %if 0%{?suse_version}
@@ -49,11 +51,7 @@ Recommends: bzip2
Recommends: ed Recommends: ed
Recommends: procmail Recommends: procmail
Recommends: unzip Recommends: unzip
%endif
%if 0%{?suse_version} > 1120
Recommends: xz Recommends: xz
%endif
%if 0%{?suse_version} > 1210
Recommends: zstd Recommends: zstd
%endif %endif
@@ -98,7 +96,9 @@ export NO_BRP_STALE_LINK_ERROR=yes
make install BUILD_ROOT=%{buildroot} make install BUILD_ROOT=%{buildroot}
install -m 644 lib/quilt.elc \ install -m 644 lib/quilt.elc \
%{buildroot}%{_datadir}/emacs/site-lisp/ %{buildroot}%{_datadir}/emacs/site-lisp/
mv %{buildroot}%{_sysconfdir}/bash_completion.d/quilt{,.sh} %define completionsdir %(pkg-config --variable completionsdir bash-completion)
install -m 755 -d %{buildroot}%{completionsdir}
mv %{buildroot}%{_sysconfdir}/bash_completion.d/quilt %{buildroot}%{completionsdir}/quilt
# We only needed the /usr/bin/patch compatibility symlink for the # We only needed the /usr/bin/patch compatibility symlink for the
# test suite. # test suite.
[ %{buildroot}%{_datadir}/quilt/compat/patch -ef /usr/bin/patch ] \ [ %{buildroot}%{_datadir}/quilt/compat/patch -ef /usr/bin/patch ] \
@@ -118,8 +118,8 @@ install -m 644 %_sourcedir/suse-start-quilt-mode.el \
%{_bindir}/quilt %{_bindir}/quilt
%{_datadir}/quilt/ %{_datadir}/quilt/
%{_datadir}/emacs/ %{_datadir}/emacs/
%{completionsdir}/quilt
%config %{_sysconfdir}/quilt.quiltrc %config %{_sysconfdir}/quilt.quiltrc
%config %{_sysconfdir}/bash_completion.d/quilt.sh
%doc %{_mandir}/man1/guards.1.gz %doc %{_mandir}/man1/guards.1.gz
%doc %{_mandir}/man1/quilt.1.gz %doc %{_mandir}/man1/quilt.1.gz
%doc doc/README %doc doc/README

View File

@@ -0,0 +1,71 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: Let quilt setup deal with ExclusiveArch
References: boo#1238516
If the spec file includes an ExclusiveArch statement and the local
architecture isn't part of the list, rpmbuild will fail. Check for
the presence of this statement before calling rpmbuild, and if it
would fail, pass option --target to set the architecture to a
supported one.
---
quilt/setup.in | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -270,6 +270,7 @@ inspect()
--define "__unzip $tmpdir/bin/unzip" \
--define "__7zip $tmpdir/bin/7z" \
"${DEFINE_FUZZ[@]}" \
+ "${FORCE_ARCH[@]}" \
--nodeps \
-bp "$specdir/$specfile" < /dev/null >&5 2>&5
status=$?
@@ -343,7 +344,36 @@ eval set -- "$options"
export QUILT_SETUP_FAST=1
prefix=
sourcedir=
-declare -a DEFINE_FUZZ
+declare -a DEFINE_FUZZ FORCE_ARCH
+
+# Sets FORCE_ARCH if needed
+check_exclusivearch()
+{
+ local spec_file=$1 our_arch a
+ local -a archs
+
+ archs=( $(sed -ne 's/^ExclusiveArch:[[:space:]]*\(.*\)$/\1/p' "$spec_file") )
+ if [ ${#archs[@]} -eq 0 ]
+ then
+ return
+ fi
+
+ # ExclusiveArch statement is present
+ our_arch=$(arch 2>/dev/null)
+ for a in "${archs[@]}"
+ do
+ if [ "$a" == "$our_arch" ]
+ then
+ # We are in the list, so no problem
+ return
+ fi
+ done
+
+ # We are not in the exclusive arch list. Force the target to the
+ # first listed architecture to make rpmbuild happy.
+
+ FORCE_ARCH=( "--target" "${archs[0]}" )
+}
while true
do
@@ -417,6 +447,9 @@ case "$1" in
# check if rpmbuild is installed before running inspect
check_external_tool rpmbuild rpm-build
+ # check if ExclusiveArch statement would block rpmbuild
+ check_exclusivearch "$spec_file"
+
if [ -n "$QUILT_SETUP_FAST" ]
then
if [ "${prefix:0:1}" = / ]

View File

@@ -1,27 +0,0 @@
Upstream: Never
Old Suse spec files have a pseudo release string which uses characters
newer versions of rpmbuild don't like. Filter them out to make rpmbuild
happy again. Packages in openSUSE 11.4 and later no longer need this.
---
quilt/setup.in | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -213,6 +213,14 @@ inspect()
ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/unzip
ln -s $QUILT_DIR/scripts/inspect-wrapper $tmpdir/bin/7z
+ # Older versions of Suse packages have a symbolic release number, and
+ # rpmbuild won't like that, so change it to something compliant.
+ if grep -q '^Release:.*[<>]' "$specdir/$specfile"
+ then
+ sed -e '/^Release:/s/[<>]//g' < "$specdir/$specfile" > $tmpdir/"$specfile"
+ specdir=$tmpdir
+ fi
+
# Redirect file descriptors
# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both (real errors)
if [ -n "$verbose" ]