tags 920776 + patch
quit

Patches attached.  I've been using this and happily running "make
sparse" within a copy of git.git.

Usage:

  git pull --no-log origin tag v0.6.0
  git am -3 *.patch
  debuild -I -i

Thoughts of all kinds welcome, as always.  If you'd prefer this in the
form of a "git pull"-able repository, a push to salsa, or an NMU, just
ask.

Thanks,
Jonathan
>From daad6363969dc9260f87c26b419c88f00db661de Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnie...@gmail.com>
Date: Mon, 28 Jan 2019 17:37:19 -0800
Subject: [PATCH 1/3] [debian] document new upstream version in d/changelog

---
 debian/changelog | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index f86a3d0c..9d415949 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-sparse (0.5.2-3) UNRELEASED; urgency=medium
+sparse (0.6.0-1) UNRELEASED; urgency=medium
 
+  * New upstream release (Closes: #920776)
   * Remove the warnings inserted by llvm-config (Closes: #912566)
 
  -- Sylvestre Ledru <sylves...@debian.org>  Sat, 17 Nov 2018 09:38:24 +0100
-- 
2.20.1.495.gaa96b0ce6b

>From 26fe9b6e164264ad912bc04bc885f8b4c6fa3eb3 Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnie...@gmail.com>
Date: Mon, 28 Jan 2019 17:37:23 -0800
Subject: [PATCH 2/3] [debian] refresh patches

---
 debian/changelog                              |  5 ++
 ...ate-version.h-when-needed-and-remove.patch | 47 -------------------
 debian/patches/honor-CPPFLAGS.patch           | 29 ------------
 debian/patches/ld-as-needed.patch             | 18 ++-----
 debian/patches/remove-llvm-flags.diff         | 22 ---------
 ...ove-validation-tmp.o-in-clean-target.patch | 24 ----------
 debian/patches/series                         |  4 --
 debian/patches/use-gcc-8.patch                |  6 +--
 8 files changed, 12 insertions(+), 143 deletions(-)
 delete mode 100644 debian/patches/build-only-generate-version.h-when-needed-and-remove.patch
 delete mode 100644 debian/patches/honor-CPPFLAGS.patch
 delete mode 100644 debian/patches/remove-llvm-flags.diff
 delete mode 100644 debian/patches/remove-validation-tmp.o-in-clean-target.patch

diff --git a/debian/changelog b/debian/changelog
index 9d415949..246b3b70 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,11 @@
 sparse (0.6.0-1) UNRELEASED; urgency=medium
 
   * New upstream release (Closes: #920776)
+    - Drop patches applied or fixed differently upstream:
+      - 3ff507b6e9e6 ("build: pass CPPFLAGS to compiler")
+      - 081679882c3f ("build: add *.o to clean-check pattern")
+      - 5844e1713cf6 ("build: only generate version.h when needed")
+      - 65840c61dc7a ("build: only need includedir from llvm-config")
   * Remove the warnings inserted by llvm-config (Closes: #912566)
 
  -- Sylvestre Ledru <sylves...@debian.org>  Sat, 17 Nov 2018 09:38:24 +0100
diff --git a/debian/patches/build-only-generate-version.h-when-needed-and-remove.patch b/debian/patches/build-only-generate-version.h-when-needed-and-remove.patch
deleted file mode 100644
index 9845688a..00000000
--- a/debian/patches/build-only-generate-version.h-when-needed-and-remove.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u...@kleine-koenig.org>
-Date: Thu, 14 Sep 2017 20:44:05 +0200
-Subject: [PATCH] build: only generate version.h when needed and remove it in
- clean target
-
-This way version.h isn't generated when running $(make clean) but only
-when lib.c is about to be compiled.
-
-This simplifies packaging for Debian because the package building programs
-abort when there are additional files after $(make clean).
-
-Forwarded: id:20170914184540.26650-1-...@kleine-koenig.org
-
---- a/Makefile
-+++ b/Makefile
-@@ -1,12 +1,6 @@
- VERSION=0.5.2
- 
--# Generating file version.h if current version has changed
- SPARSE_VERSION:=$(shell git describe 2>/dev/null || echo '$(VERSION)')
--VERSION_H := $(shell cat version.h 2>/dev/null)
--ifneq ($(lastword $(VERSION_H)),"$(SPARSE_VERSION)")
--$(info $(shell echo '     GEN      'version.h))
--$(shell echo '#define SPARSE_VERSION "$(SPARSE_VERSION)"' > version.h)
--endif
- 
- OS = linux
- 
-@@ -215,6 +209,18 @@
- %.o: %.c $(LIB_H)
- 	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $(CPPFLAGS) $<
- 
-+version.h: FORCE
-+	$(QUIET_GEN)echo '#define SPARSE_VERSION "$(SPARSE_VERSION)"' > version.h.tmp; \
-+	if cmp -s version.h version.h.tmp; then \
-+		rm version.h.tmp; \
-+	else \
-+		mv version.h.tmp version.h; \
-+	fi
-+
-+.PHONY: FORCE
-+
-+lib.o: version.h
-+
- %.sc: %.c sparse
- 	$(QUIET_CHECK) $(CHECKER) $(CHECKER_FLAGS) -c $(ALL_CFLAGS) $(CPPFLAGS) $<
- 
diff --git a/debian/patches/honor-CPPFLAGS.patch b/debian/patches/honor-CPPFLAGS.patch
deleted file mode 100644
index 3494c6a9..00000000
--- a/debian/patches/honor-CPPFLAGS.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Uwe Kleine-König <u...@kleine-koenig.org>
-Subject: Honor CPPFLAGS
-
-CPPFLAGS is a standard variable that should be passed to the compiler.
-
-Debian's package build tools pass "-Wdate-time -D_FORTIFY_SOURCE=2" in this
-variable.
-
-Signed-off-by: Uwe Kleine-König <u...@kleine-koenig.org>
-Forwarded: id:20180419045418.23676-1-...@kleine-koenig.org
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/Makefile
-+++ b/Makefile
-@@ -213,10 +213,10 @@ c2xml.o c2xml.sc: PKG_CFLAGS += $(LIBXML_CFLAGS)
- pre-process.sc: CHECKER_FLAGS += -Wno-vla
- 
- %.o: %.c $(LIB_H)
--	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
-+	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $(CPPFLAGS) $<
- 
- %.sc: %.c sparse
--	$(QUIET_CHECK) $(CHECKER) $(CHECKER_FLAGS) -c $(ALL_CFLAGS) $<
-+	$(QUIET_CHECK) $(CHECKER) $(CHECKER_FLAGS) -c $(ALL_CFLAGS) $(CPPFLAGS) $<
- 
- ALL_OBJS :=  $(LIB_OBJS) $(foreach p,$(PROGRAMS),$(p).o $($(p)_EXTRA_DEPS))
- selfcheck: $(ALL_OBJS:.o=.sc)
diff --git a/debian/patches/ld-as-needed.patch b/debian/patches/ld-as-needed.patch
index f3ed8b76..3b14363d 100644
--- a/debian/patches/ld-as-needed.patch
+++ b/debian/patches/ld-as-needed.patch
@@ -20,21 +20,11 @@ This fixes:
 
 --- a/Makefile
 +++ b/Makefile
-@@ -8,7 +8,7 @@
+@@ -8,6 +8,7 @@
  CC = gcc
- COMMON_CFLAGS = -O2 -finline-functions -fno-strict-aliasing -g
- COMMON_CFLAGS += -Wall -Wwrite-strings
--LDFLAGS += -g
-+LDFLAGS += -g -Wl,--as-needed
+ CFLAGS = -O2 -g
+ CFLAGS += -Wall -Wwrite-strings
++LDFLAGS = -g -Wl,--as-needed
  LD = gcc
  AR = ar
  PKG_CONFIG = pkg-config
-@@ -89,7 +89,7 @@
- ifeq ($(shell expr "$(LLVM_VERSION)" : '[3-9]\.'),2)
- LLVM_PROGS := sparse-llvm
- $(LLVM_PROGS): LD := g++
--LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags)
-+LLVM_LDFLAGS := -Wl,--no-as-needed  $(shell $(LLVM_CONFIG) --ldflags) -Wl,--as-needed
- LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g" | sed -e "s/-pedantic//g")
- LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs)
- LLVM_LIBS += $(shell $(LLVM_CONFIG) --system-libs 2>/dev/null)
diff --git a/debian/patches/remove-llvm-flags.diff b/debian/patches/remove-llvm-flags.diff
deleted file mode 100644
index 7d710c2a..00000000
--- a/debian/patches/remove-llvm-flags.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Sylvestre Ledru <sylves...@debian.org>
-Date: Sat Nov 17 09:38:44 2018 +0100
-Subject: [PATCH] believe llvm-config even less
-
-Starting with llvm 7 llvm-config --cflags issues several warning flags that are
-not even supported by gcc.
-
-Debian-Bug: https://bugs.debian.org/912566
-
-Index: sparse-0.5.2/Makefile
-===================================================================
---- sparse-0.5.2.orig/Makefile
-+++ sparse-0.5.2/Makefile
-@@ -90,7 +90,7 @@ ifeq ($(shell expr "$(LLVM_VERSION)" : '
- LLVM_PROGS := sparse-llvm
- $(LLVM_PROGS): LD := g++
- LLVM_LDFLAGS := -Wl,--no-as-needed  $(shell $(LLVM_CONFIG) --ldflags) -Wl,--as-needed
--LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g" | sed -e "s/-pedantic//g")
-+LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g" | sed -e "s/-pedantic//g" | sed 's/\S*\(-W\)\S*//g' )
- LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs)
- LLVM_LIBS += $(shell $(LLVM_CONFIG) --system-libs 2>/dev/null)
- PROGRAMS += $(LLVM_PROGS)
diff --git a/debian/patches/remove-validation-tmp.o-in-clean-target.patch b/debian/patches/remove-validation-tmp.o-in-clean-target.patch
deleted file mode 100644
index 59017340..00000000
--- a/debian/patches/remove-validation-tmp.o-in-clean-target.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Uwe Kleine-König <u...@kleine-koenig.org>
-Date: Sun, 19 Jul 2015 11:46:49 +0200
-Subject: [PATCH] remove validation/tmp.o in clean target
-
-To prevent validation/tmp.o being still around after
-
-	make check && make clean
-
-remove it as part of the latter command.
-
-Signed-off-by: Uwe Kleine-König <u...@kleine-koenig.org>
-Forwarded: id:20180419051728.25352-1-...@kleine-koenig.org
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/Makefile
-+++ b/Makefile
-@@ -242,4 +242,5 @@
- 	                 -o -name "*.c.error.expected" \
- 	                 -o -name "*.c.error.got" \
- 	                 -o -name "*.c.error.diff" \
-+			 -o -name "*.o" \
- 	                 \) -exec rm {} \;
diff --git a/debian/patches/series b/debian/patches/series
index 81ec8630..eae47bec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,2 @@
-honor-CPPFLAGS.patch
-remove-validation-tmp.o-in-clean-target.patch
-build-only-generate-version.h-when-needed-and-remove.patch
 ld-as-needed.patch
 use-gcc-8.patch
-remove-llvm-flags.diff
diff --git a/debian/patches/use-gcc-8.patch b/debian/patches/use-gcc-8.patch
index a130e20d..8b976326 100644
--- a/debian/patches/use-gcc-8.patch
+++ b/debian/patches/use-gcc-8.patch
@@ -27,6 +27,6 @@ Forwarded: no
  
 -CC = gcc
 +CC = gcc-8
- COMMON_CFLAGS = -O2 -finline-functions -fno-strict-aliasing -g
- COMMON_CFLAGS += -Wall -Wwrite-strings
- LDFLAGS += -g -Wl,--as-needed
+ CFLAGS = -O2 -g
+ CFLAGS += -Wall -Wwrite-strings
+ LDFLAGS = -g -Wl,--as-needed
-- 
2.20.1.495.gaa96b0ce6b

>From abea219b4c89ac924f65ee581b359aa4f9958774 Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnie...@gmail.com>
Date: Mon, 28 Jan 2019 17:37:26 -0800
Subject: [PATCH 3/3] [debian] adapt to removal of installed libsparse

As explained upstream:

  However, it seems that sparse is only used for its tools and not
  as a library (at least not as an external one) and currently
  doesn't offer a stable interface.

  For now, remove the support for this. It will be easy enough to
  restore it if there is a new need.
---
 debian/changelog      | 1 +
 debian/sparse.install | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 246b3b70..97966838 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ sparse (0.6.0-1) UNRELEASED; urgency=medium
       - 081679882c3f ("build: add *.o to clean-check pattern")
       - 5844e1713cf6 ("build: only generate version.h when needed")
       - 65840c61dc7a ("build: only need includedir from llvm-config")
+    - c3490e701eaa ("build: remove unused support for pkgconfig")
   * Remove the warnings inserted by llvm-config (Closes: #912566)
 
  -- Sylvestre Ledru <sylves...@debian.org>  Sat, 17 Nov 2018 09:38:24 +0100
diff --git a/debian/sparse.install b/debian/sparse.install
index aa6cf04a..25e1e92d 100644
--- a/debian/sparse.install
+++ b/debian/sparse.install
@@ -1,5 +1,3 @@
 /usr/bin/c*
 /usr/bin/sparse*
-/usr/include
-/usr/lib
 /usr/share
-- 
2.20.1.495.gaa96b0ce6b

Reply via email to