https://bugzilla.redhat.com/show_bug.cgi?id=2034758



--- Comment #19 from Maxwell G <[email protected]> ---
I have some other comments about the specfile. Please let me know if you have
any questions.

- > License: BSD-3-Clause-LBNL and LICENSE-APACHE-2.0

You need to use Fedora license identifiers[1] here. This should be `License:
BSD and ASL 2.0`.

[1]:
https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#SoftwareLicenses

- You should remove the SUSE conditionals, as per
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_spec_legibility.

- You should use `%autosetup -n %{name}-%{package_version} -p1` in `%prep` to
prepare the archive. Remove all of the text that I quoted below and put the
`./mconfig` line right below `%build. You can get rid of the rest of the `cd`
commands and the manual patching; `%autosetup` will take care of this for you.


```
%if "%{?buildroot}"
export RPM_BUILD_ROOT="%{buildroot}"
%endif

if [ -d %{name}-%{version} ]; then
    # Clean up old build root
    # First clean go's modcache because directories are unwritable
    GOPATH=$PWD/%{name}-%{version}/gopath go clean -modcache
    rm -rf %{name}-%{version}
fi

# Create our build root
mkdir %{name}-%{version}

%build
cd %{name}-%{version}

# Setup an empty GOPATH for the build
export GOPATH=$PWD/gopath
mkdir -p "$GOPATH"

# Extract the source
tar -xf "%SOURCE0"
cd %{name}-%{package_version}

patch -p1 <%PATCH0

%if "%{?SOURCE1}" != ""
GOVERSION="$(echo %SOURCE1|sed 's,.*/,,;s/go//;s/\.src.*//')"
if ! ./mlocal/scripts/check-min-go-version go $GOVERSION; then
        # build the go tool chain, the existing version is too old
        pushd ..
        tar -xf %SOURCE1
        cd go/src
        ./make.bash
        cd ../..
        export PATH=$PWD/go/bin:$PATH
        popd
fi
%endif
```

- > make -C builddir old_config=

You should use the `%make_build` macro.

- > make -C builddir DESTDIR=$RPM_BUILD_ROOT install

You should use the `%make_install` macro.

- You should install the docs using `%doc` and the licenses using `%license` in
the `%files` list.

For example:

```
# Define `%license` tag if not already defined. This is needed for EL 7
compatibility.

%{!?_licensedir:%global license %doc}

%files
...
%doc CHANGELOG.md README.md
%license LICENSE.md LICENSE-LBNL.md LICENSE-APACHE-2.0 NOTICE-APACHE-2.0
```

- `%define package_version 1.0.0-rc.2` should use `%global` instead of
`%define`.[2]

[2]:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_global_preferred_over_define


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2034758
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to