SHA256
1
0
forked from pool/quilt

Accepting request 100927 from devel:tools:scm

OBS-URL: https://build.opensuse.org/request/show/100927
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quilt?expand=0&rev=40
This commit is contained in:
Stephan Kulow 2012-01-25 10:08:51 +00:00 committed by Git OBS Bridge
commit 8710994f5d
8 changed files with 306 additions and 56 deletions

View File

@ -0,0 +1,102 @@
---
Makefile.in | 13 +++++++------
configure.ac | 7 +------
2 files changed, 8 insertions(+), 12 deletions(-)
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,7 @@
PACKAGE := @PACKAGE_NAME@
VERSION := @PACKAGE_VERSION@
RELEASE := @PACKAGE_RELEASE@
+PACKAGE_TARNAME := @PACKAGE_TARNAME@
PACKAGE_BUGREPORT := @PACKAGE_BUGREPORT@
prefix := @prefix@
@@ -213,7 +214,7 @@ doc/quilt.1: doc/quilt.1.in $(QUILT:%=qu
;; \
*@DOCSUBDIR@*) \
echo "$$line" | \
- $(SED) -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \
+ $(SED) -e 's:@DOCSUBDIR''@:$(docdir):g' \
;; \
*) \
echo "$$line" \
@@ -272,7 +273,7 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu
-e 's:@RELEASE''@:$(RELEASE):g' \
-e 's:@ETCDIR''@:$(etcdir):g' \
-e 's:@LOCALEDIR''@:$(localedir):g' \
- -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \
+ -e 's:@DOCSUBDIR''@:$(docdir):g' \
$< > $@
@$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
@@ -331,11 +332,11 @@ endif
$(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE)
$(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/
- $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(INSTALL) -d $(BUILD_ROOT)$(docdir)/
$(INSTALL) -m 644 doc/README \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(BUILD_ROOT)$(docdir)/
$(INSTALL) -m 644 doc/quilt.pdf doc/README.MAIL \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(BUILD_ROOT)$(docdir)/
$(INSTALL) -d $(BUILD_ROOT)$(mandir)/man1
$(INSTALL) -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
@@ -373,7 +374,7 @@ uninstall ::
$(notdir $(MAN1))) \
$(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt \
$(BUILD_ROOT)$(etcdir)/quilt.quiltrc \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/ \
+ $(BUILD_ROOT)$(docdir)/ \
$(BUILD_ROOT)$(emacsdir)/quilt.el
check: $(TESTS:test/%.test=test/.%.ok)
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,7 @@ AC_REVISION ($Revision: 1.84 $)
PACKAGE_RELEASE=1
AC_SUBST(PACKAGE_RELEASE)
+AC_SUBST(PACKAGE_TARNAME)
dnl Setup for backup-files compilation
AC_HEADER_STDC
@@ -370,12 +371,6 @@ if test $USE_NLS = no ; then
fi
AC_SUBST(USE_NLS)
-dnl Determine where package documentation is supposed to go
-if test -n "$RPM_DOC_DIR" ; then
- docdir="$RPM_DOC_DIR"
-else
- docdir='$(datadir)/doc'
-fi
AC_SUBST(docdir)
dnl Check for rpmbuild (v4) vs. rpm (v3)
--- a/configure
+++ b/configure
@@ -1902,6 +1902,7 @@ ac_configure="$SHELL $ac_aux_dir/configu
PACKAGE_RELEASE=1
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6757,11 +6758,6 @@ $as_echo "$as_me: Building without natur
fi
-if test -n "$RPM_DOC_DIR" ; then
- docdir="$RPM_DOC_DIR"
-else
- docdir='$(datadir)/doc'
-fi

View File

@ -1,51 +0,0 @@
---
Makefile.in | 10 +++++-----
doc/quilt.1.in | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
--- quilt-0.50.orig/Makefile.in
+++ quilt-0.50/Makefile.in
@@ -268,7 +268,7 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu
-e 's:@RELEASE''@:$(RELEASE):g' \
-e 's:@ETCDIR''@:$(etcdir):g' \
-e 's:@LOCALEDIR''@:$(localedir):g' \
- -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \
+ -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE):g' \
$< > $@
@$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
@@ -327,11 +327,11 @@ endif
$(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE)
$(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/
- $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
$(INSTALL) -m 644 doc/README \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
$(INSTALL) -m 644 doc/quilt.pdf doc/README.MAIL \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
$(INSTALL) -d $(BUILD_ROOT)$(mandir)/man1
$(INSTALL) -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
@@ -369,7 +369,7 @@ uninstall ::
$(notdir $(MAN1))) \
$(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt \
$(BUILD_ROOT)$(etcdir)/quilt.quiltrc \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/ \
+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/ \
$(BUILD_ROOT)$(emacsdir)/quilt.el
check: $(TESTS:test/%.test=test/.%.ok)
--- quilt-0.50.orig/doc/quilt.1.in
+++ quilt-0.50/doc/quilt.1.in
@@ -224,7 +224,7 @@ the pdf documentation, and in the help m
.SH SEE ALSO
-The pdf documentation, which should be under /usr/share/doc/quilt/quilt.pdf.
+The pdf documentation, which should be under /usr/share/doc/packages/quilt/quilt.pdf.
Note that some distributors compress this file.
.BR zxpdf ( 1 )
can be used to display compressed pdf files.

View File

@ -0,0 +1,31 @@
inspect: Complain if wrapper script can't be executed.
There is no guarantee that the wrapper script can be executed.
For example user can mount their temporary directories with noexec
for security reasons. Instead of failing with no explanation,
complain when this situation is detected.
---
quilt/scripts/inspect.in | 11 +++++++++++
1 file changed, 11 insertions(+)
--- a/quilt/scripts/inspect.in
+++ b/quilt/scripts/inspect.in
@@ -317,7 +317,18 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
${0##*/} "$@" < $tmpdir/data
fi
EOF
+
chmod 755 $tmpdir/bin/wrapper
+# If $TMPDIR is mounted with noexec, rpmbuild won't be able to execute
+# our wrapper script
+if [ ! -x $tmpdir/bin/wrapper ]
+then
+ printf "Cannot execute %s; filesystem mounted with noexec?\n" \
+ $tmpdir/bin/wrapper >&2
+ printf "Setting %s in ~/.quiltrc may help\n" "VARTMPDIR" >&2
+ exit 1
+fi
+
ln -s wrapper $tmpdir/bin/patch
ln -s wrapper $tmpdir/bin/tar

View File

@ -0,0 +1,70 @@
inspect: Leave stderr free for actual error reporting.
---
quilt/scripts/inspect.in | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
--- quilt-0.50.orig/quilt/scripts/inspect.in
+++ quilt-0.50/quilt/scripts/inspect.in
@@ -76,11 +76,12 @@ then
fi
# Redirect file descriptors
+# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both (real errors)
if [ -n "$verbose" ]
then
- exec 3>&1 4>/dev/null
+ exec 3>&1 5>&2 4>/dev/null
else
- exec 3>&1 4>&2 2>/dev/null
+ exec 3>&1 4>&2 5>/dev/null
fi
# create md5 sums, also for uncompressed files
@@ -96,7 +97,7 @@ do
esac
[ -f "$file" ] || continue
echo -n "." >&4
- echo "md5sum < $file" >&2
+ echo "md5sum < $file" >&5
set -- $(md5sum < "$file")
echo "$1 $basename"
@@ -118,25 +119,25 @@ do
case "$filetype" in
compress*|gzip*)
echo -n "g" >&4
- echo "gzip -cd $file | md5sum" >&2
+ echo "gzip -cd $file | md5sum" >&5
set -- $(gzip -cd "$file" | md5sum)
echo "$1 $basename"
;;
bzip2*)
echo -n "b" >&4
- echo "bzip2 -cd $file | md5sum" >&2
+ echo "bzip2 -cd $file | md5sum" >&5
set -- $(bzip2 -cd "$file" | md5sum)
echo "$1 $basename"
;;
xz*|XZ*)
echo -n "x" >&4
- echo "xz -cd $file | md5sum" >&2
+ echo "xz -cd $file | md5sum" >&5
set -- $(xz -cd "$file" | md5sum)
echo "$1 $basename"
;;
lzma*)
echo -n "l" >&4
- echo "lzma -cd $file | md5sum" >&2
+ echo "lzma -cd $file | md5sum" >&5
set -- $(lzma -cd "$file" | md5sum)
echo "$1 $basename"
;;
@@ -339,7 +340,7 @@ rpmbuild --eval "%define _sourcedir $sou
--eval "%define __tar $tmpdir/bin/tar" \
--eval "$DEFINE_FUZZ" \
--nodeps \
- -bp "$specdir/$specfile" < /dev/null >&2
+ -bp "$specdir/$specfile" < /dev/null >&5 2>&5
status=$?
echo >&4
exit $status

14
patchfns-non-exec.patch Normal file
View File

@ -0,0 +1,14 @@
Really skip setting execute bit on scripts/patchfns.
Index: quilt/Makefile.in
===================================================================
--- quilt.orig/Makefile.in
+++ quilt/Makefile.in
@@ -275,7 +275,7 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu
-e 's:@LOCALEDIR''@:$(localedir):g' \
-e 's:@DOCSUBDIR''@:$(docdir):g' \
$< > $@
- @$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
+ @$(if $(filter $@,$(NON_EXEC_IN)),,chmod +x $@)
lib/backup-files.o :: Makefile

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Tue Jan 17 21:34:30 CET 2012 - jdelvare@suse.de
- inspect-remap-outputs.patch,
inspect-check-if-wrapper-executable.patch: inspect: Report if
patch/tar wrapper can't be executed (quilt setup).
-------------------------------------------------------------------
Fri Dec 16 14:41:39 CET 2011 - jdelvare@suse.de
- Fix two rpmlint warnings.
-------------------------------------------------------------------
Fri Dec 16 11:53:53 CET 2011 - jdelvare@suse.de
- Don't call autoconf during build, assume configure script is
already up-to-date. This avoids problems when version of autoconf
is too old.
-------------------------------------------------------------------
Thu Dec 15 15:18:04 CET 2011 - jdelvare@suse.de
- Delete docdir.diff, replaced with
substitute-docdir-in-man-page.patch and
change-docdir-definition.patch. Upstream solution for the same
problem.
-------------------------------------------------------------------
Wed Dec 7 23:26:56 CET 2011 - jdelvare@suse.de

View File

@ -36,12 +36,16 @@ AutoReqProv: off
Source: %{name}-%{version}.tar.bz2
Source1: suse-start-quilt-mode.el
Patch1: expand.diff
Patch2: docdir.diff
Patch2: substitute-docdir-in-man-page.patch
Patch3: patch-wrapper-rpm.diff
Patch4: grep-support-spaces.patch
Patch5: suse-workaround-pseudo-release.patch
Patch6: mail-fix-delivery-address-checking.patch
Patch7: fix-inspect.patch
Patch8: change-docdir-definition.patch
Patch9: patchfns-non-exec.patch
Patch10: inspect-remap-outputs.patch
Patch11: inspect-check-if-wrapper-executable.patch
Url: http://savannah.nongnu.org/projects/quilt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -68,9 +72,12 @@ Authors:
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%build
autoconf
# --with-rpmbuild=/usr/lib/rpm/rpmb:
#
# SUSE Autobuild uses a version of /usr/bin/rpmbuild that sources
@ -80,12 +87,13 @@ autoconf
CFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=/usr \
--mandir=%{_mandir} \
--docdir=%{_docdir}/%{name} \
--with-sendmail=/usr/sbin/sendmail \
--with-diffstat=/usr/bin/diffstat \
--with-patch-wrapper \
--with-patch=/usr/bin/patch \
--with-rpmbuild=/usr/lib/rpm/rpmb
make %{?jobs:-j%jobs} BUILD_ROOT=$RPM_BUILD_ROOT RELEASE=%release
make %{?jobs:-j%jobs} RELEASE=%release
# Compile quilt.el for faster emacs startup (bnc#617673)
pushd lib
emacs -batch -q --no-site -f batch-byte-compile quilt.el
@ -102,8 +110,6 @@ make install BUILD_ROOT=$RPM_BUILD_ROOT
install -m 644 lib/quilt.elc \
$RPM_BUILD_ROOT/usr/share/emacs/site-lisp/
mv $RPM_BUILD_ROOT/etc/bash_completion.d/quilt{,.sh}
#make rpmlint happy
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/quilt/scripts/patchfns
# We only needed the /usr/bin/patch compatibility symlink for the
# test suite.
[ $RPM_BUILD_ROOT/usr/share/quilt/compat/patch -ef /usr/bin/patch ] \

View File

@ -0,0 +1,51 @@
From eccbe8d7db4dfcbcd6a5c3f7c1949c9681f3faf0 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Tue, 06 Dec 2011 16:48:01 +0000
Subject: Man page: substitute documentation directory name in path to PDF documentation
---
diff --git a/Makefile.in b/Makefile.in
index bdf015d..2ddea7e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -211,6 +211,10 @@ doc/quilt.1: doc/quilt.1.in $(QUILT:%=quilt/%) $(COMPAT)
-e $$'s/^ \\(-[^\t]*\\)\t\\?/.IP " \\1" 8\\\n/' \
-e $$'s/^ \t\\?//' \
;; \
+ *@DOCSUBDIR@*) \
+ echo "$$line" | \
+ $(SED) -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \
+ ;; \
*) \
echo "$$line" \
;; \
diff --git a/doc/quilt.1.in b/doc/quilt.1.in
index 1c1dcc2..db91b14 100644
--- a/doc/quilt.1.in
+++ b/doc/quilt.1.in
@@ -224,7 +224,7 @@ the pdf documentation, and in the help messages of each commands.
.SH SEE ALSO
-The pdf documentation, which should be under /usr/share/doc/quilt/quilt.pdf.
+The pdf documentation, which should be under @DOCSUBDIR@/quilt.pdf.
Note that some distributors compress this file.
.BR zxpdf ( 1 )
can be used to display compressed pdf files.
diff --git a/quilt.changes b/quilt.changes
index 24d2ef7..2054e1f 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Dec 6 17:44:55 CET 2011 - jdelvare@suse.de
+
+- Makefile.in, doc/quilt.1.in: Substitute documentation directory
+ name in path to PDF documentation.
+
+-------------------------------------------------------------------
Mon Dec 5 22:00:00 CET 2011 - jdelvare@suse.de
- configure*: Bump version to 0.50.
--
cgit v0.9.0.2