From abfb918aebe04f2c221f6e6e2d8ae847360bb3d0 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Mon, 11 Aug 2014 18:54:30 +0000 Subject: [PATCH 1/7] more touching --- .gitignore | 1 + golang.spec | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8f0d407..11e6069 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /golang-19087:a15f344a9efa-xattrs.tar /go1.2.1.src.tar.gz /go1.2.2.src.tar.gz +/go1.3.src.tar.gz diff --git a/golang.spec b/golang.spec index 87a2d61..49d74e0 100644 --- a/golang.spec +++ b/golang.spec @@ -39,7 +39,7 @@ Name: golang Version: 1.2.2 -Release: 15%{?dist} +Release: 16%{?dist} Summary: The Go Programming Language License: BSD @@ -479,6 +479,10 @@ cp -apv api bin doc favicon.ico include lib pkg robots.txt src misc VERSION \ # bz1099206 find $RPM_BUILD_ROOT%{goroot}/src -exec touch -r $RPM_BUILD_ROOT%{goroot}/VERSION "{}" \; +# and level out all the built archives +touch $RPM_BUILD_ROOT%{goroot}/pkg +find $RPM_BUILD_ROOT%{goroot}/pkg -exec touch -r $RPM_BUILD_ROOT%{goroot}/pkg "{}" \; + # remove the unnecessary zoneinfo file (Go will always use the system one first) rm -rfv $RPM_BUILD_ROOT%{goroot}/lib/time @@ -890,6 +894,9 @@ fi %changelog +* Mon Aug 11 2014 Vincent Batts - 1.2.2-16 +- touch all the built archives to be the same + * Mon Aug 11 2014 Vincent Batts - 1.2.2-15 - make golang-src 'noarch' again, since that was not a fix, and takes up more space From 9380b0ecebc3ab83622f68a2d860502c94f7ff9c Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 12 Aug 2014 15:01:25 +0000 Subject: [PATCH 2/7] file list for src tree --- golang.spec | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/golang.spec b/golang.spec index 49d74e0..0894db9 100644 --- a/golang.spec +++ b/golang.spec @@ -39,7 +39,7 @@ Name: golang Version: 1.2.2 -Release: 16%{?dist} +Release: 17%{?dist} Summary: The Go Programming Language License: BSD @@ -482,7 +482,13 @@ find $RPM_BUILD_ROOT%{goroot}/src -exec touch -r $RPM_BUILD_ROOT%{goroot}/VERSIO # and level out all the built archives touch $RPM_BUILD_ROOT%{goroot}/pkg find $RPM_BUILD_ROOT%{goroot}/pkg -exec touch -r $RPM_BUILD_ROOT%{goroot}/pkg "{}" \; - +# generate the spec file ownership of this source tree +src_list=$(pwd)/go-src.list +touch $src_list +pushd $RPM_BUILD_ROOT%{goroot} + find src/ -type d -printf '%%%dir %{goroot}/%p\n' >> $src_list + find src/ ! -type d -printf '%{goroot}/%p\n' >> $src_list +popd # remove the unnecessary zoneinfo file (Go will always use the system one first) rm -rfv $RPM_BUILD_ROOT%{goroot}/lib/time @@ -665,7 +671,7 @@ fi %{_xemacs_sitestartdir}/*.el %endif -%files src +%files -f go-src.list src %{goroot}/src/ %ifarch %{ix86} @@ -894,6 +900,9 @@ fi %changelog +* Tue Aug 12 2014 Vincent Batts - 1.2.2-17 +- explicitly list all the files and directories of the src tree, to preserve timestamps + * Mon Aug 11 2014 Vincent Batts - 1.2.2-16 - touch all the built archives to be the same From 110e264e04a7b5d2f987c8fa5364fc654cc5559a Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 12 Aug 2014 20:52:59 +0000 Subject: [PATCH 3/7] now build file list for pkg rpms too --- golang.spec | 97 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 35 deletions(-) diff --git a/golang.spec b/golang.spec index 0894db9..439ddda 100644 --- a/golang.spec +++ b/golang.spec @@ -23,6 +23,9 @@ %global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot \ /usr/lib/rpm/brp-compress +# allow turning this off +%{!?build_xemacs:%global build_xemacs 1} + # let this match the macros in macros.golang %global goroot /usr/lib/%{name} %global gopath %{_datadir}/gocode @@ -39,7 +42,7 @@ Name: golang Version: 1.2.2 -Release: 17%{?dist} +Release: 18%{?dist} Summary: The Go Programming Language License: BSD @@ -64,7 +67,7 @@ Requires: golang-src BuildRequires: emacs # xemacs on fedora only -%if 0%{?fedora} +%if 0%{?fedora} && %{build_xemacs} == 1 BuildRequires: xemacs # xemacs-packages-extra-20130408-3 worked fine, but not the newer bump # https://bugzilla.redhat.com/show_bug.cgi?id=1127518 @@ -149,7 +152,7 @@ BuildArch: noarch # xemacs on fedora only -%if 0%{?fedora} +%if 0%{?fedora} && %{build_xemacs} == 1 %package -n xemacs-%{name} Summary: XEmacs add-on package for Go Requires: xemacs(bin) >= %{_xemacs_version} @@ -447,7 +450,7 @@ popd cd misc mv emacs/go-mode-load.el emacs/%{name}-init.el # xemacs on fedora only -%if 0%{?fedora} +%if 0%{?fedora} && %{build_xemacs} == 1 cp -av emacs xemacs %{_xemacs_bytecompile} xemacs/go-mode.el %endif @@ -455,16 +458,6 @@ cp -av emacs xemacs cd .. -%check -export GOROOT=$(pwd -P) -export PATH="$PATH":"$GOROOT"/bin -cd src -# not using our 'gcc' since the CFLAGS fails crash_cgo_test.go due to unused variables -# https://code.google.com/p/go/issues/detail?id=6883 -./run.bash --no-rebuild -cd .. - - %install rm -rf $RPM_BUILD_ROOT @@ -482,12 +475,30 @@ find $RPM_BUILD_ROOT%{goroot}/src -exec touch -r $RPM_BUILD_ROOT%{goroot}/VERSIO # and level out all the built archives touch $RPM_BUILD_ROOT%{goroot}/pkg find $RPM_BUILD_ROOT%{goroot}/pkg -exec touch -r $RPM_BUILD_ROOT%{goroot}/pkg "{}" \; -# generate the spec file ownership of this source tree -src_list=$(pwd)/go-src.list +# generate the spec file ownership of this source tree and packages +cwd=$(pwd) +src_list=$cwd/go-src.list +rm -f $src_list touch $src_list pushd $RPM_BUILD_ROOT%{goroot} find src/ -type d -printf '%%%dir %{goroot}/%p\n' >> $src_list find src/ ! -type d -printf '%{goroot}/%p\n' >> $src_list + + + for goos in darwin freebsd linux netbsd openbsd plan9 windows ; do + for goarch in 386 amd64 arm ; do + if [ "${goarch}" = "arm" ] ; then + if [ "${goos}" = "darwin" -o "${goos}" = "windows" -o "${goos}" = "plan9" -o "${goos}" = "openbsd" ] ;then + continue + fi + fi + file_list=${cwd}/pkg-${goos}-${goarch}.list + rm -f $file_list + touch $file_list + find pkg/${goos}_${goarch}/ -type d -printf '%%%dir %{goroot}/%p\n' >> $file_list + find pkg/${goos}_${goarch}/ ! -type d -printf '%{goroot}/%p\n' >> $file_list + done + done popd # remove the unnecessary zoneinfo file (Go will always use the system one first) @@ -541,7 +552,7 @@ cp -av misc/emacs/go-mode.* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name} cp -av misc/emacs/%{name}-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir} # xemacs on fedora only -%if 0%{?fedora} +%if 0%{?fedora} && %{build_xemacs} == 1 # misc/xemacs mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitestartdir} @@ -576,6 +587,19 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm cp -av %{SOURCE102} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.golang %endif +%check +export GOROOT=$(pwd -P) +export PATH="$PATH":"$GOROOT"/bin +cd src +# not using our 'gcc' since the CFLAGS fails crash_cgo_test.go due to unused variables +# https://code.google.com/p/go/issues/detail?id=6883 +./run.bash --no-rebuild +cd .. +if [ $(go list -json std | grep Stale | wc -l) -gt 2 ] ; then + # cmd/go and cmd/gofmt show like they are stale. we can ignore + exit 1 +fi + %ifarch %{ix86} %post pkg-bin-linux-386 @@ -664,7 +688,7 @@ fi # xemacs on fedora only -%if 0%{?fedora} +%if 0%{?fedora} && %{build_xemacs} == 1 %files -n xemacs-%{name} %doc AUTHORS CONTRIBUTORS LICENSE PATENTS %{_xemacs_sitelispdir}/%{name} @@ -810,7 +834,7 @@ fi %{goroot}/src/pkg/runtime/ztime_linux_arm.c %endif -%files pkg-linux-386 +%files pkg-linux-386 -f pkg-linux-386.list %{goroot}/pkg/linux_386/ %ifarch %{ix86} %exclude %{goroot}/pkg/linux_386/runtime/cgo.a @@ -819,7 +843,7 @@ fi %{goroot}/pkg/tool/linux_386/fix %{goroot}/pkg/tool/linux_386/yacc -%files pkg-linux-amd64 +%files pkg-linux-amd64 -f pkg-linux-amd64.list %{goroot}/pkg/linux_amd64/ %ifarch x86_64 %exclude %{goroot}/pkg/linux_amd64/runtime/cgo.a @@ -828,7 +852,7 @@ fi %{goroot}/pkg/tool/linux_amd64/fix %{goroot}/pkg/tool/linux_amd64/yacc -%files pkg-linux-arm +%files pkg-linux-arm -f pkg-linux-arm.list %{goroot}/pkg/linux_arm/ %ifarch %{arm} %exclude %{goroot}/pkg/linux_arm/runtime/cgo.a @@ -837,59 +861,59 @@ fi %{goroot}/pkg/tool/linux_arm/fix %{goroot}/pkg/tool/linux_arm/yacc -%files pkg-darwin-386 +%files pkg-darwin-386 -f pkg-darwin-386.list %{goroot}/pkg/darwin_386/ %{goroot}/pkg/tool/darwin_386/ -%files pkg-darwin-amd64 +%files pkg-darwin-amd64 -f pkg-darwin-amd64.list %{goroot}/pkg/darwin_amd64/ %{goroot}/pkg/tool/darwin_amd64/ -%files pkg-windows-386 +%files pkg-windows-386 -f pkg-windows-386.list %{goroot}/pkg/windows_386/ %{goroot}/pkg/tool/windows_386/ -%files pkg-windows-amd64 +%files pkg-windows-amd64 -f pkg-windows-amd64.list %{goroot}/pkg/windows_amd64/ %{goroot}/pkg/tool/windows_amd64/ -%files pkg-plan9-386 +%files pkg-plan9-386 -f pkg-plan9-386.list %{goroot}/pkg/plan9_386/ %{goroot}/pkg/tool/plan9_386/ -%files pkg-plan9-amd64 +%files pkg-plan9-amd64 -f pkg-plan9-amd64.list %{goroot}/pkg/plan9_amd64/ %{goroot}/pkg/tool/plan9_amd64/ -%files pkg-freebsd-386 +%files pkg-freebsd-386 -f pkg-freebsd-386.list %{goroot}/pkg/freebsd_386/ %{goroot}/pkg/tool/freebsd_386/ -%files pkg-freebsd-amd64 +%files pkg-freebsd-amd64 -f pkg-freebsd-amd64.list %{goroot}/pkg/freebsd_amd64/ %{goroot}/pkg/tool/freebsd_amd64/ -%files pkg-freebsd-arm +%files pkg-freebsd-arm -f pkg-freebsd-arm.list %{goroot}/pkg/freebsd_arm/ %{goroot}/pkg/tool/freebsd_arm/ -%files pkg-netbsd-386 +%files pkg-netbsd-386 -f pkg-netbsd-386.list %{goroot}/pkg/netbsd_386/ %{goroot}/pkg/tool/netbsd_386/ -%files pkg-netbsd-amd64 +%files pkg-netbsd-amd64 -f pkg-netbsd-amd64.list %{goroot}/pkg/netbsd_amd64/ %{goroot}/pkg/tool/netbsd_amd64/ -%files pkg-netbsd-arm +%files pkg-netbsd-arm -f pkg-netbsd-arm.list %{goroot}/pkg/netbsd_arm/ %{goroot}/pkg/tool/netbsd_arm/ -%files pkg-openbsd-386 +%files pkg-openbsd-386 -f pkg-openbsd-386.list %{goroot}/pkg/openbsd_386/ %{goroot}/pkg/tool/openbsd_386/ -%files pkg-openbsd-amd64 +%files pkg-openbsd-amd64 -f pkg-openbsd-amd64.list %{goroot}/pkg/openbsd_amd64/ %{goroot}/pkg/tool/openbsd_amd64/ @@ -900,6 +924,9 @@ fi %changelog +* Tue Aug 12 2014 Vincent Batts - 1.2.2-18 +- explicitly list all the files and directories for the packages trees + * Tue Aug 12 2014 Vincent Batts - 1.2.2-17 - explicitly list all the files and directories of the src tree, to preserve timestamps From 3b49f3293c98ef0767e2b75c6d7f8fdb4926739a Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 13 Aug 2014 01:04:25 +0000 Subject: [PATCH 4/7] touch cgo.a in a %post Signed-off-by: Vincent Batts --- golang.spec | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/golang.spec b/golang.spec index 439ddda..3473f9a 100644 --- a/golang.spec +++ b/golang.spec @@ -42,7 +42,7 @@ Name: golang Version: 1.2.2 -Release: 18%{?dist} +Release: 19%{?dist} Summary: The Go Programming Language License: BSD @@ -603,6 +603,13 @@ fi %ifarch %{ix86} %post pkg-bin-linux-386 +# since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, +# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a +if go list -json runtime/cgo | grep -q Stale ; then + runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') + cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') + touch -r ${runtime_file} ${cgo_file} +fi %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_386/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_386/gofmt @@ -615,6 +622,13 @@ fi %ifarch x86_64 %post pkg-bin-linux-amd64 +# since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, +# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a +if go list -json runtime/cgo | grep -q Stale ; then + runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') + cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') + touch -r ${runtime_file} ${cgo_file} +fi %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_amd64/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_amd64/gofmt @@ -627,6 +641,13 @@ fi %ifarch %{arm} %post pkg-bin-linux-arm +# since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, +# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a +if go list -json runtime/cgo | grep -q Stale ; then + runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') + cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') + touch -r ${runtime_file} ${cgo_file} +fi %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_arm/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_arm/gofmt @@ -924,6 +945,9 @@ fi %changelog +* Tue Aug 12 2014 Vincent Batts - 1.2.2-19 +- finally check for a Stale cgo in a %%post + * Tue Aug 12 2014 Vincent Batts - 1.2.2-18 - explicitly list all the files and directories for the packages trees From 31e8a62d232ec1759b91187517018978b41a4e2f Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 13 Aug 2014 11:55:03 +0000 Subject: [PATCH 5/7] order the deps for the %post to run correctly Signed-off-by: Vincent Batts --- golang.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/golang.spec b/golang.spec index 3473f9a..d766d18 100644 --- a/golang.spec +++ b/golang.spec @@ -42,7 +42,7 @@ Name: golang Version: 1.2.2 -Release: 19%{?dist} +Release: 20%{?dist} Summary: The Go Programming Language License: BSD @@ -179,6 +179,7 @@ BuildArch: noarch Summary: Golang compiler tool for linux 386 Requires: go = %{version}-%{release} Requires: golang-pkg-linux-386 = %{version}-%{release} +Requires(post): golang-pkg-linux-386 = %{version}-%{release} Provides: golang-bin = 386 # We strip the meta dependency, but go does require glibc. # This is an odd issue, still looking for a better fix. @@ -194,6 +195,7 @@ Requires(postun): %{_sbindir}/update-alternatives Summary: Golang compiler tool for linux amd64 Requires: go = %{version}-%{release} Requires: golang-pkg-linux-amd64 = %{version}-%{release} +Requires(post): golang-pkg-linux-amd64 = %{version}-%{release} Provides: golang-bin = amd64 # We strip the meta dependency, but go does require glibc. # This is an odd issue, still looking for a better fix. @@ -209,6 +211,7 @@ Requires(postun): %{_sbindir}/update-alternatives Summary: Golang compiler tool for linux arm Requires: go = %{version}-%{release} Requires: golang-pkg-linux-arm = %{version}-%{release} +Requires(post): golang-pkg-linux-arm = %{version}-%{release} Provides: golang-bin = arm # We strip the meta dependency, but go does require glibc. # This is an odd issue, still looking for a better fix. @@ -945,6 +948,9 @@ fi %changelog +* Wed Aug 13 2014 Vincent Batts - 1.2.2-20 +- rpm dependency ordering for %%post + * Tue Aug 12 2014 Vincent Batts - 1.2.2-19 - finally check for a Stale cgo in a %%post From 33152ba710583cace2f5602cec4b4ce292b9e891 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 13 Aug 2014 14:32:02 +0000 Subject: [PATCH 6/7] touch cgo.a in %post, regardless --- golang.spec | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/golang.spec b/golang.spec index d766d18..0887274 100644 --- a/golang.spec +++ b/golang.spec @@ -42,7 +42,7 @@ Name: golang Version: 1.2.2 -Release: 20%{?dist} +Release: 21%{?dist} Summary: The Go Programming Language License: BSD @@ -607,12 +607,10 @@ fi %ifarch %{ix86} %post pkg-bin-linux-386 # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a -if go list -json runtime/cgo | grep -q Stale ; then - runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - touch -r ${runtime_file} ${cgo_file} -fi +runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +touch -r ${runtime_file} ${cgo_file} + %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_386/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_386/gofmt @@ -626,12 +624,10 @@ fi %ifarch x86_64 %post pkg-bin-linux-amd64 # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a -if go list -json runtime/cgo | grep -q Stale ; then - runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - touch -r ${runtime_file} ${cgo_file} -fi +runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +touch -r ${runtime_file} ${cgo_file} + %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_amd64/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_amd64/gofmt @@ -645,12 +641,10 @@ fi %ifarch %{arm} %post pkg-bin-linux-arm # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -# then a multitude of packages will appear Stale. For sanity we'll check whether cgo is Stale, and plum it up to runtime.a -if go list -json runtime/cgo | grep -q Stale ; then - runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') - touch -r ${runtime_file} ${cgo_file} -fi +runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') +touch -r ${runtime_file} ${cgo_file} + %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_arm/go 90 \ --slave %{_bindir}/gofmt gofmt %{goroot}/bin/linux_arm/gofmt @@ -948,6 +942,9 @@ fi %changelog +* Wed Aug 13 2014 Vincent Batts - 1.2.2-21 +- touch cgo.a regardless + * Wed Aug 13 2014 Vincent Batts - 1.2.2-20 - rpm dependency ordering for %%post From 84033d417e23b09d4702e5062368326b3b27d8b2 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 13 Aug 2014 16:54:12 +0000 Subject: [PATCH 7/7] not sure why this %post is not setting the mtime of cgo.a. Making it more explicit --- golang.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/golang.spec b/golang.spec index 0887274..c30b9bb 100644 --- a/golang.spec +++ b/golang.spec @@ -42,7 +42,7 @@ Name: golang Version: 1.2.2 -Release: 21%{?dist} +Release: 22%{?dist} Summary: The Go Programming Language License: BSD @@ -607,9 +607,7 @@ fi %ifarch %{ix86} %post pkg-bin-linux-386 # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') -cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') -touch -r ${runtime_file} ${cgo_file} +touch -r %{goroot}/pkg/linux_386/runtime.a %{goroot}/pkg/linux_386/runtime/cgo.a %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_386/go 90 \ @@ -624,9 +622,7 @@ fi %ifarch x86_64 %post pkg-bin-linux-amd64 # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') -cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') -touch -r ${runtime_file} ${cgo_file} +touch -r %{goroot}/pkg/linux_amd64/runtime.a %{goroot}/pkg/linux_amd64/runtime/cgo.a %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_amd64/go 90 \ @@ -641,9 +637,7 @@ fi %ifarch %{arm} %post pkg-bin-linux-arm # since the cgo.a packaged in this rpm will be older than the other archives likely built on the ARM builder, -runtime_file=$(go list -json runtime | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') -cgo_file=$(go list -json runtime/cgo | grep -w Target | sed -e 's/.*".*".*"\(.*\)".*/\1/') -touch -r ${runtime_file} ${cgo_file} +touch -r %{goroot}/pkg/linux_arm/runtime.a %{goroot}/pkg/linux_arm/runtime/cgo.a %{_sbindir}/update-alternatives --install %{_bindir}/go \ go %{goroot}/bin/linux_arm/go 90 \ @@ -942,6 +936,9 @@ fi %changelog +* Wed Aug 13 2014 Vincent Batts - 1.2.2-22 +- more work to get cgo.a timestamps to line up, due to build-env + * Wed Aug 13 2014 Vincent Batts - 1.2.2-21 - touch cgo.a regardless