From f6c13044b5ecfa46326e08895793a34651a02c1c Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Tue, 17 Oct 2023 21:57:42 +0000 Subject: [PATCH 01/20] Add a spec file for RPM building. --- golang-github-dnstap-golang-dnstap.spec | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 golang-github-dnstap-golang-dnstap.spec diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec new file mode 100644 index 0000000..f9e2660 --- /dev/null +++ b/golang-github-dnstap-golang-dnstap.spec @@ -0,0 +1,45 @@ +%global debug_package %{nil} + +# https://github.com/dnstap/golang-dnstap +%global goipath github.com/dnstap/golang-dnstap +Version: 0.4.0 + +%gometa + +%global common_description %{expand: +Implements an encoding format for DNS server events.} + +%global golicences LICENSE +%global godocs README + +Name: %{goname} +Release: %autorelease +Summary: DNS server event encoding format + +License: Apache-2.0 +URL: %{gourl} +Source0: %{gosource} + +%description +%{common_description} + +%gopkg + +%prep +%goprep + +%generate_buildrequires +%go_generate_buildrequires + +%install +%gopkginstall + +%if %{with check} +%check +%gocheck +%endif + +%gopkgfiles + +%changelog +%autochangelog From 67aa090968eb4a1a9ecb400f25fbb9e59ac67a5b Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Thu, 6 Mar 2025 16:38:42 -0500 Subject: [PATCH 02/20] Set specific package name to test mock --- golang-github-dnstap-golang-dnstap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec index f9e2660..1c35dd3 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-github-dnstap-golang-dnstap.spec @@ -12,7 +12,7 @@ Implements an encoding format for DNS server events.} %global golicences LICENSE %global godocs README -Name: %{goname} +Name: golang-dnstap Release: %autorelease Summary: DNS server event encoding format From 5ae8e45bc2b9e0751d9e45d0c86d1f404b6c8ddf Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Thu, 6 Mar 2025 18:50:00 -0500 Subject: [PATCH 03/20] Add rpmautospec --- golang-github-dnstap-golang-dnstap.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec index 1c35dd3..d914079 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-github-dnstap-golang-dnstap.spec @@ -20,6 +20,8 @@ License: Apache-2.0 URL: %{gourl} Source0: %{gosource} +BuildRequires: rpmautospec + %description %{common_description} From 253a0cdf7341b7d3d058554321d1e408cba31ca1 Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Thu, 6 Mar 2025 20:38:11 -0500 Subject: [PATCH 04/20] %autorelease still isn't working --- golang-github-dnstap-golang-dnstap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec index d914079..aba85f5 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-github-dnstap-golang-dnstap.spec @@ -13,7 +13,7 @@ Implements an encoding format for DNS server events.} %global godocs README Name: golang-dnstap -Release: %autorelease +Release: 1%{?dist} Summary: DNS server event encoding format License: Apache-2.0 From 38dbf5133f924441fe70a23f76bb4da52a1474fe Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Wed, 2 Apr 2025 17:36:29 -0400 Subject: [PATCH 05/20] Add specific package name as BuildRequires --- golang-github-dnstap-golang-dnstap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec index aba85f5..64f8604 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-github-dnstap-golang-dnstap.spec @@ -20,7 +20,7 @@ License: Apache-2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: rpmautospec +BuildRequires: golang-github-miekg-dns-devel rpmautospec %description %{common_description} From a9a3ad8eb2358d91e007948d6f6ce086d8087a8e Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Thu, 3 Apr 2025 17:35:26 -0400 Subject: [PATCH 06/20] Try specifying specific BuildRequires --- golang-github-dnstap-golang-dnstap.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec index 64f8604..aec11b9 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-github-dnstap-golang-dnstap.spec @@ -20,7 +20,8 @@ License: Apache-2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: golang-github-miekg-dns-devel rpmautospec +BuildRequires: golang-github-miekg-dns-devel +#BuildRequires: golang-github-miekg-dns-devel rpmautospec %description %{common_description} @@ -30,8 +31,8 @@ BuildRequires: golang-github-miekg-dns-devel rpmautospec %prep %goprep -%generate_buildrequires -%go_generate_buildrequires +#%generate_buildrequires +#%go_generate_buildrequires %install %gopkginstall From c641932b2e8872a62efd729ee65539b0f89ac36d Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Thu, 3 Apr 2025 17:36:44 -0400 Subject: [PATCH 07/20] According to my notes in Jira, this needs framestream too --- golang-github-dnstap-golang-dnstap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec index aec11b9..c8ccd7a 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-github-dnstap-golang-dnstap.spec @@ -20,7 +20,7 @@ License: Apache-2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: golang-github-miekg-dns-devel +BuildRequires: golang-github-farsightsec-golang-framestream-devel golang-github-miekg-dns-devel #BuildRequires: golang-github-miekg-dns-devel rpmautospec %description From a3d50d767a9992c462c265221e7ec37a4009c51c Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Mon, 7 Apr 2025 12:00:48 -0400 Subject: [PATCH 08/20] Try not devel for framestream --- golang-github-dnstap-golang-dnstap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-github-dnstap-golang-dnstap.spec index c8ccd7a..71aa938 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-github-dnstap-golang-dnstap.spec @@ -20,7 +20,7 @@ License: Apache-2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: golang-github-farsightsec-golang-framestream-devel golang-github-miekg-dns-devel +BuildRequires: golang-github-farsightsec-golang-framestream golang-github-miekg-dns-devel #BuildRequires: golang-github-miekg-dns-devel rpmautospec %description From 1ae1f181f1e18e1e8c312654ccf0bbd7f6050deb Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Wed, 9 Apr 2025 10:24:31 -0400 Subject: [PATCH 09/20] Try new naming pattern --- ...hub-dnstap-golang-dnstap.spec => golang-dnstap.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) rename golang-github-dnstap-golang-dnstap.spec => golang-dnstap.spec (75%) diff --git a/golang-github-dnstap-golang-dnstap.spec b/golang-dnstap.spec similarity index 75% rename from golang-github-dnstap-golang-dnstap.spec rename to golang-dnstap.spec index 71aa938..9b72d36 100644 --- a/golang-github-dnstap-golang-dnstap.spec +++ b/golang-dnstap.spec @@ -20,13 +20,17 @@ License: Apache-2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: golang-github-farsightsec-golang-framestream golang-github-miekg-dns-devel +BuildRequires: golang-github-farsightsec-go-framestream golang-github-miekg-dns-devel #BuildRequires: golang-github-miekg-dns-devel rpmautospec %description %{common_description} -%gopkg +%package -n %{goname}-devel +Summary: %{summary} +BuildArch: noarch +%description -n %{goname}-devel +%{common_description} %prep %goprep @@ -42,7 +46,7 @@ BuildRequires: golang-github-farsightsec-golang-framestream golang-github-miekg %gocheck %endif -%gopkgfiles +%files -n %{goname}-devel -f file-list %changelog %autochangelog From be48940171777d21f4438df127eedbfa81d653b8 Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Wed, 9 Apr 2025 10:25:34 -0400 Subject: [PATCH 10/20] No rpmautospec in rhel8 --- golang-dnstap.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 9b72d36..ce67db8 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -49,4 +49,3 @@ BuildArch: noarch %files -n %{goname}-devel -f file-list %changelog -%autochangelog From b40abb0936ec07ffc48eeadc4b827f26f96e9931 Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Wed, 9 Apr 2025 10:46:49 -0400 Subject: [PATCH 11/20] Update framestream dependency name --- golang-dnstap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index ce67db8..cc1236e 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -20,7 +20,7 @@ License: Apache-2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: golang-github-farsightsec-go-framestream golang-github-miekg-dns-devel +BuildRequires: golang-github-farsightsec-framestream-devel golang-github-miekg-dns-devel #BuildRequires: golang-github-miekg-dns-devel rpmautospec %description From ae709ff38d868e0648416862d1e14f2267df3a0d Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Wed, 9 Apr 2025 11:52:31 -0400 Subject: [PATCH 12/20] New spec pattern --- golang-dnstap.spec | 49 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index cc1236e..98833a8 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -21,10 +21,6 @@ URL: %{gourl} Source0: %{gosource} BuildRequires: golang-github-farsightsec-framestream-devel golang-github-miekg-dns-devel -#BuildRequires: golang-github-miekg-dns-devel rpmautospec - -%description -%{common_description} %package -n %{goname}-devel Summary: %{summary} @@ -33,19 +29,52 @@ BuildArch: noarch %{common_description} %prep -%goprep - -#%generate_buildrequires -#%go_generate_buildrequires +%setup -q +%autopatch -p1 %install -%gopkginstall +install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; do + echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file + echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list +done +# source codes for building projects +install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list +# find all *.s and generate devel.file-list +for file in $(find . -iname "*.s") ; do + echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file + echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list +done +# find all *.c and generate devel.file-list +for file in $(find . -iname "*.c") ; do + echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file + echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list +done +# find all *.go but no *_test.go files and generate devel.file-list +for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do + echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file + echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list +done +sort -u -o devel.file-list devel.file-list +install -m 0755 -vd %{buildroot}%{gopath}/src/%(dirname %{oldgoipath}) + +%if %{rhel} != 8 %if %{with check} %check %gocheck %endif +%endif -%files -n %{goname}-devel -f file-list +%files -n %{goname}-devel -f devel.file-list %changelog From ade7bb5ffff07e60dbc5ae5485189a3e161bab29 Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Wed, 9 Apr 2025 11:55:02 -0400 Subject: [PATCH 13/20] Put the description back in --- golang-dnstap.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 98833a8..0632d47 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -21,6 +21,10 @@ URL: %{gourl} Source0: %{gosource} BuildRequires: golang-github-farsightsec-framestream-devel golang-github-miekg-dns-devel +#BuildRequires: golang-github-miekg-dns-devel rpmautospec + +%description +%{common_description} %package -n %{goname}-devel Summary: %{summary} From 4d9f86742244a0c603f87630380087e6e8d7cf20 Mon Sep 17 00:00:00 2001 From: Maximillian Crawford Date: Wed, 9 Apr 2025 11:55:28 -0400 Subject: [PATCH 14/20] Remove extra BuildRequires --- golang-dnstap.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 0632d47..4132987 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -21,7 +21,6 @@ URL: %{gourl} Source0: %{gosource} BuildRequires: golang-github-farsightsec-framestream-devel golang-github-miekg-dns-devel -#BuildRequires: golang-github-miekg-dns-devel rpmautospec %description %{common_description} From 13b74fb78b2137806fb39d80e8aace3010ce253b Mon Sep 17 00:00:00 2001 From: mcrawforddt <153119983+mcrawforddt@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:02:20 -0400 Subject: [PATCH 15/20] Update golang-dnstap.spec --- golang-dnstap.spec | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 4132987..3c992d1 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -36,40 +36,14 @@ BuildArch: noarch %autopatch -p1 %install -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +find . for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; do - echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list -done - -# source codes for building projects -install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ -echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list -# find all *.s and generate devel.file-list -for file in $(find . -iname "*.s") ; do - echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list -done -# find all *.c and generate devel.file-list -for file in $(find . -iname "*.c") ; do - echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list -done -# find all *.go but no *_test.go files and generate devel.file-list -for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do - echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file - echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list + echo "%%dir %%{gopath}/src/%%{goipath}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file + echo "%%{gopath}/src/%%{goipath}/$file" >> devel.file-list done sort -u -o devel.file-list devel.file-list -install -m 0755 -vd %{buildroot}%{gopath}/src/%(dirname %{oldgoipath}) %if %{rhel} != 8 %if %{with check} From d00687056d778bca11e43a136a82da38fa98359d Mon Sep 17 00:00:00 2001 From: mcrawforddt <153119983+mcrawforddt@users.noreply.github.com> Date: Mon, 30 Jun 2025 13:56:31 -0400 Subject: [PATCH 16/20] Update golang-dnstap.spec --- golang-dnstap.spec | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 3c992d1..d228d00 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -1,35 +1,47 @@ -%global debug_package %{nil} +# Define backup go macros +%if %{rhel} == 8 +%global gopkg %package -n %{goname}-devel \ +Summary: %{summary} \ +BuildArch: noarch \ +%description -n %{goname}-devel \ +%{common_description} +%global generate_buildrequires echo "Need more specific macro on rhel8" +%global gopkginstall for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; do \ + echo "%%dir %%{gopath}/src/%%{goipath}/$(dirname $file)" >> devel.file-list ;\ + install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file) ;\ + cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file ;\ + echo "%%{gopath}/src/%%{goipath}/$file" >> devel.file-list ;\ +done ;\ +sort -u -o devel.file-list devel.file-list +%global gopkgfiles %files -n %{goname}-devel -f devel.file-list +# Specific BuildRequires macro +%global go_generate_buildrequires BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} golang-github-farsightsec-framestream-devel golang-github-miekg-dns-devel +%endif +%global debug_package %{nil} # https://github.com/dnstap/golang-dnstap %global goipath github.com/dnstap/golang-dnstap -Version: 0.4.0 - -%gometa - %global common_description %{expand: Implements an encoding format for DNS server events.} %global golicences LICENSE %global godocs README -Name: golang-dnstap +Version: 0.4.0 Release: 1%{?dist} Summary: DNS server event encoding format - +%gometa +Name: golang-dnstap License: Apache-2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: golang-github-farsightsec-framestream-devel golang-github-miekg-dns-devel - %description %{common_description} -%package -n %{goname}-devel -Summary: %{summary} -BuildArch: noarch -%description -n %{goname}-devel -%{common_description} +%go_generate_buildrequires + +%gopkg %prep %setup -q @@ -45,13 +57,11 @@ for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; done sort -u -o devel.file-list devel.file-list -%if %{rhel} != 8 %if %{with check} %check %gocheck %endif -%endif -%files -n %{goname}-devel -f devel.file-list +%gopkgfiles %changelog From 78c04fba9b9477d33d586e7d635425137bce2387 Mon Sep 17 00:00:00 2001 From: mcrawforddt <153119983+mcrawforddt@users.noreply.github.com> Date: Mon, 30 Jun 2025 14:15:00 -0400 Subject: [PATCH 17/20] Update golang-dnstap.spec --- golang-dnstap.spec | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index d228d00..6256dc8 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -48,14 +48,7 @@ Source0: %{gosource} %autopatch -p1 %install -find . -for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; do - echo "%%dir %%{gopath}/src/%%{goipath}/$(dirname $file)" >> devel.file-list - install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file) - cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file - echo "%%{gopath}/src/%%{goipath}/$file" >> devel.file-list -done -sort -u -o devel.file-list devel.file-list +%gopkginstall %if %{with check} %check From 4e89d8e422ba44a0dde10d2cc36a27950718c59b Mon Sep 17 00:00:00 2001 From: mcrawforddt <153119983+mcrawforddt@users.noreply.github.com> Date: Mon, 30 Jun 2025 14:32:05 -0400 Subject: [PATCH 18/20] Update golang-dnstap.spec --- golang-dnstap.spec | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 6256dc8..0923e49 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -6,14 +6,6 @@ BuildArch: noarch \ %description -n %{goname}-devel \ %{common_description} %global generate_buildrequires echo "Need more specific macro on rhel8" -%global gopkginstall for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; do \ - echo "%%dir %%{gopath}/src/%%{goipath}/$(dirname $file)" >> devel.file-list ;\ - install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file) ;\ - cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file ;\ - echo "%%{gopath}/src/%%{goipath}/$file" >> devel.file-list ;\ -done ;\ -sort -u -o devel.file-list devel.file-list -%global gopkgfiles %files -n %{goname}-devel -f devel.file-list # Specific BuildRequires macro %global go_generate_buildrequires BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} golang-github-farsightsec-framestream-devel golang-github-miekg-dns-devel %endif @@ -48,13 +40,19 @@ Source0: %{gosource} %autopatch -p1 %install -%gopkginstall +for file in $(find . -iname "*.go" \! -iname "*_test.go" \! -iname "main.go" ) ; do + echo "%%dir %%{gopath}/src/%%{goipath}/$(dirname $file)" >> devel.file-list + install -d -p %{buildroot}/%{gopath}/src/%{goipath}/$(dirname $file) + cp -pav $file %{buildroot}/%{gopath}/src/%{goipath}/$file + echo "%%{gopath}/src/%%{goipath}/$file" >> devel.file-list +done +sort -u -o devel.file-list devel.file-list %if %{with check} %check %gocheck %endif -%gopkgfiles +%files devel -f devel.file-list %changelog From a0dc3382cd5d20d7735a1831310ef8065bf00c45 Mon Sep 17 00:00:00 2001 From: mcrawforddt <153119983+mcrawforddt@users.noreply.github.com> Date: Tue, 1 Jul 2025 12:40:29 -0400 Subject: [PATCH 19/20] Update golang-dnstap.spec --- golang-dnstap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 0923e49..7175f58 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -23,7 +23,7 @@ Version: 0.4.0 Release: 1%{?dist} Summary: DNS server event encoding format %gometa -Name: golang-dnstap +Name: %{goname} License: Apache-2.0 URL: %{gourl} Source0: %{gosource} From 37131f3849a2b8e4fef03c717ada77ef061b6234 Mon Sep 17 00:00:00 2001 From: mcrawforddt <153119983+mcrawforddt@users.noreply.github.com> Date: Tue, 1 Jul 2025 16:19:32 -0400 Subject: [PATCH 20/20] Update golang-dnstap.spec --- golang-dnstap.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/golang-dnstap.spec b/golang-dnstap.spec index 7175f58..b51bbfa 100644 --- a/golang-dnstap.spec +++ b/golang-dnstap.spec @@ -23,7 +23,7 @@ Version: 0.4.0 Release: 1%{?dist} Summary: DNS server event encoding format %gometa -Name: %{goname} +Name: golang-dnstap License: Apache-2.0 URL: %{gourl} Source0: %{gosource} @@ -53,6 +53,6 @@ sort -u -o devel.file-list devel.file-list %gocheck %endif -%files devel -f devel.file-list +%files -n %{goname}-devel -f devel.file-list %changelog