In Golang packaging (Fedora), the -devel subpackages are computed by a Lua 
macro called gopkg.

In rpm 4.14.2, if I try to rpmbuild the SPEC containing such macros and a 
scriptlet, I get:
```
error: line 41: %pretrans devel -p <lua>
: package golang-github-hashicorp-cleanhttp-devel does not exist
```

Similarly if I run rpmspec -P on the SPEC, the macros are not expanded:
```
%description

Convenience utilities for acquiring "clean" http.Transport and http.Client
structs

%gopkg

%prep
%goprep
```

However in EPEL7, with rpm 4.11.3, it works fine: srpm is built and rpmspec -P 
expands the macros:
```
Convenience utilities for acquiring "clean" http.Transport and http.Client
structs



%package     -n golang-github-hashicorp-cleanhttp-devel
Summary:        Convenience utilities for "clean" http.Transport and 
http.Client structs
BuildRequires:  go-rpm-macros
BuildArch:      noarch

%description -n golang-github-hashicorp-cleanhttp-devel
Convenience utilities for acquiring "clean" http.Transport and http.Client
structs

This package contains the source code needed for building packages that
reference the following Go import paths:
 – github.com/hashicorp/go-cleanhttp





%prep
%setup -q -n go-cleanhttp-0.5.1


rm -fr         "/builddir/build/BUILD/go-cleanhttp-0.5.1/vendor"
if [[ ! -e            "/builddir/build/BUILD/go-cleanhttp-0.5.1/_build/bin" ]] 
; then
  install -m 0755 -vd "/builddir/build/BUILD/go-cleanhttp-0.5.1/_build/bin"
  export 
GOPATH="/builddir/build/BUILD/go-cleanhttp-0.5.1/_build:${GOPATH:+${GOPATH}:}/usr/share/gocode"
fi
if [[ ! -e                      
"/builddir/build/BUILD/go-cleanhttp-0.5.1/_build/src/github.com/hashicorp/go-cleanhttp"
 ]] ; then
  install -m 0755 -vd "$(dirname 
/builddir/build/BUILD/go-cleanhttp-0.5.1/_build/src/github.com/hashicorp/go-cleanhttp)"
  ln -fs "/builddir/build/BUILD/go-cleanhttp-0.5.1"       
"/builddir/build/BUILD/go-cleanhttp-0.5.1/_build/src/github.com/hashicorp/go-cleanhttp"
fi
cd                              
"/builddir/build/BUILD/go-cleanhttp-0.5.1/_build/src/github.com/hashicorp/go-cleanhttp"
```

Something has changed between 4.11.3 and 4.14.2 that makes the macros not being 
expanded.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/672
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to