Bug#975025: flex: reproducible builds: example Makefiles contain build paths

2022-09-21 Thread Vagrant Cascadian
On 2021-11-30, Vagrant Cascadian wrote:
> On 2021-01-01, Vagrant Cascadian wrote:
>> On 2020-11-17, Vagrant Cascadian wrote:
>>> From 4b9384cc7b73f984507c75f15f293982896135a4 Mon Sep 17 00:00:00 2001
>>> From: Vagrant Cascadian 
>>> Date: Wed, 18 Nov 2020 04:04:02 +
>>> Subject: [PATCH] debian/rules: Remove example autogenerated Makefiles which
>>>  contain build paths.
>>>
>>> ---
>>>  debian/rules | 9 +
>>>  1 file changed, 9 insertions(+)
>>>
>>> diff --git a/debian/rules b/debian/rules
>>> index d0d5597..31a4c72 100755
>>> --- a/debian/rules
>>> +++ b/debian/rules
>>> @@ -91,6 +91,15 @@ ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
>>> debian/flex-doc/usr/share/doc/flex-doc/
>>>  endif
>>>  
>>> +override_dh_installexamples:
>>> +   dh_installexamples
>>> +   # Remove autogenerated Makefiles which contain embedded build
>>> +   # paths in order to ensure reproducible builds.
>>> +   test ! -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile || \
>>> +   rm -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile
>>> +   test ! -f debian/flex/usr/share/doc/flex/examples/manual/Makefile || \
>>> +   rm -f debian/flex/usr/share/doc/flex/examples/manual/Makefile
>>> +
>>>  override_dh_auto_build:
>>> dh_auto_build
>>>  ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
>>> -- 
>>> 2.29.2
>>
>> Would very much like to see this land in bullseye... would you consider
>> uploading soon, or be amenable to an NMU?
>
> Still hoping to see this fixed for bookworm!

I have uploaded an NMU fixing this to DELAYED 10, with the following
debdiff:

diff -u flex-2.6.4/debian/changelog flex-2.6.4/debian/changelog
--- flex-2.6.4/debian/changelog
+++ flex-2.6.4/debian/changelog
@@ -1,3 +1,11 @@
+flex (2.6.4-8.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/rules: Remove example autogenerated Makefiles which contain
+build paths. (Closes: #975025)
+
+ -- Vagrant Cascadian   Wed, 21 Sep 2022 
23:35:53 +
+
 flex (2.6.4-8) unstable; urgency=medium

   * The source does not ship with example Makefiles, so no need to massage 
them.
diff -u flex-2.6.4/debian/rules flex-2.6.4/debian/rules
--- flex-2.6.4/debian/rules
+++ flex-2.6.4/debian/rules
@@ -91,6 +91,13 @@
debian/flex-doc/usr/share/doc/flex-doc/
 endif

+override_dh_installexamples:
+   dh_installexamples
+   # Remove autogenerated Makefiles which contain embedded build
+   # paths in order to ensure reproducible builds.
+   rm -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile
+   rm -f debian/flex/usr/share/doc/flex/examples/manual/Makefile
+
 override_dh_auto_build:
dh_auto_build
 ifneq (,$(filter flex-doc, $(shell dh_listpackages)))


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#975025: flex: reproducible builds: example Makefiles contain build paths

2021-11-30 Thread Vagrant Cascadian
On 2021-01-01, Vagrant Cascadian wrote:
> On 2020-11-17, Vagrant Cascadian wrote:
>> From 4b9384cc7b73f984507c75f15f293982896135a4 Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian 
>> Date: Wed, 18 Nov 2020 04:04:02 +
>> Subject: [PATCH] debian/rules: Remove example autogenerated Makefiles which
>>  contain build paths.
>>
>> ---
>>  debian/rules | 9 +
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/debian/rules b/debian/rules
>> index d0d5597..31a4c72 100755
>> --- a/debian/rules
>> +++ b/debian/rules
>> @@ -91,6 +91,15 @@ ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
>> debian/flex-doc/usr/share/doc/flex-doc/
>>  endif
>>  
>> +override_dh_installexamples:
>> +dh_installexamples
>> +# Remove autogenerated Makefiles which contain embedded build
>> +# paths in order to ensure reproducible builds.
>> +test ! -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile || \
>> +rm -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile
>> +test ! -f debian/flex/usr/share/doc/flex/examples/manual/Makefile || \
>> +rm -f debian/flex/usr/share/doc/flex/examples/manual/Makefile
>> +
>>  override_dh_auto_build:
>>  dh_auto_build
>>  ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
>> -- 
>> 2.29.2
>
> Would very much like to see this land in bullseye... would you consider
> uploading soon, or be amenable to an NMU?

Still hoping to see this fixed for bookworm!


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#975025: flex: reproducible builds: example Makefiles contain build paths

2021-01-01 Thread Vagrant Cascadian
On 2020-11-17, Vagrant Cascadian wrote:
> From 4b9384cc7b73f984507c75f15f293982896135a4 Mon Sep 17 00:00:00 2001
> From: Vagrant Cascadian 
> Date: Wed, 18 Nov 2020 04:04:02 +
> Subject: [PATCH] debian/rules: Remove example autogenerated Makefiles which
>  contain build paths.
>
> ---
>  debian/rules | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/debian/rules b/debian/rules
> index d0d5597..31a4c72 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -91,6 +91,15 @@ ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
> debian/flex-doc/usr/share/doc/flex-doc/
>  endif
>  
> +override_dh_installexamples:
> + dh_installexamples
> + # Remove autogenerated Makefiles which contain embedded build
> + # paths in order to ensure reproducible builds.
> + test ! -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile || \
> + rm -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile
> + test ! -f debian/flex/usr/share/doc/flex/examples/manual/Makefile || \
> + rm -f debian/flex/usr/share/doc/flex/examples/manual/Makefile
> +
>  override_dh_auto_build:
>   dh_auto_build
>  ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
> -- 
> 2.29.2

Would very much like to see this land in bullseye... would you consider
uploading soon, or be amenable to an NMU?


Thanks for maintaining flex!


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#975025: flex: reproducible builds: example Makefiles contain build paths

2020-11-17 Thread Vagrant Cascadian
Source: flex
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpaths
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Well, this is a bit of a re-run: Bug#949343: flex: Embeds build paths in
example Makefiles

But in my proposed fix for that version, I neglected to test only
building arch:all packages, which triggered: #961778 flex: binary-all
FTBFS

This time, I'm proposing a much simpler fix; just remove the generated
Makefiles, but only remove them when ... they are actually present!
(e.g. arch:any build vs. arch:all build)

I think this is a better approach than sanitizing the Makefile, since
the Makefile.am is also shipped, and a person who wanted to build the
examples would probably need to regenerate the Makefile anyways.

Patch attached, tested with arch:all only, arch:any only and
arch:all+any builds.


live well,
  vagrant
From 4b9384cc7b73f984507c75f15f293982896135a4 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian 
Date: Wed, 18 Nov 2020 04:04:02 +
Subject: [PATCH] debian/rules: Remove example autogenerated Makefiles which
 contain build paths.

---
 debian/rules | 9 +
 1 file changed, 9 insertions(+)

diff --git a/debian/rules b/debian/rules
index d0d5597..31a4c72 100755
--- a/debian/rules
+++ b/debian/rules
@@ -91,6 +91,15 @@ ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
debian/flex-doc/usr/share/doc/flex-doc/
 endif
 
+override_dh_installexamples:
+	dh_installexamples
+	# Remove autogenerated Makefiles which contain embedded build
+	# paths in order to ensure reproducible builds.
+	test ! -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile || \
+		rm -f debian/flex/usr/share/doc/flex/examples/fastwc/Makefile
+	test ! -f debian/flex/usr/share/doc/flex/examples/manual/Makefile || \
+		rm -f debian/flex/usr/share/doc/flex/examples/manual/Makefile
+
 override_dh_auto_build:
 	dh_auto_build
 ifneq (,$(filter flex-doc, $(shell dh_listpackages)))
-- 
2.29.2



signature.asc
Description: PGP signature