The package rpms/hugo.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/hugo.git/commit/?id=78c6651845396....
Change:
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
Thanks.
Full change:
============
commit 4d9d39403140fbd07bfeac1fc09f22d296ea56bd
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Fri Mar 1 18:59:48 2019 -0500
Add fix for new emoji test results.
diff --git a/0001-Fix-tests-against-latest-emoji-package.patch
b/0001-Fix-tests-against-latest-emoji-package.patch
new file mode 100644
index 0000000..2c51e95
--- /dev/null
+++ b/0001-Fix-tests-against-latest-emoji-package.patch
@@ -0,0 +1,54 @@
+From 8f25792a159f13f11e742d255df589f7e8b18d24 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+Date: Fri, 1 Mar 2019 18:47:19 -0500
+Subject: [PATCH] Fix tests against latest emoji package.
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
+---
+ docs/data/docs.json | 2 +-
+ tpl/transform/init.go | 2 +-
+ tpl/transform/transform_test.go | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/docs/data/docs.json b/docs/data/docs.json
+index 6400900a..1c0b94e7 100644
+--- a/docs/data/docs.json
++++ b/docs/data/docs.json
+@@ -3475,7 +3475,7 @@
+ "Examples": [
+ [
+ "{{ \"I :heart: Hugo\" | emojify }}",
+- "I Hugo"
++ "I Hugo"
+ ]
+ ]
+ },
+diff --git a/tpl/transform/init.go b/tpl/transform/init.go
+index 86951c25..898d3ea9 100644
+--- a/tpl/transform/init.go
++++ b/tpl/transform/init.go
+@@ -32,7 +32,7 @@ func init() {
+ ns.AddMethodMapping(ctx.Emojify,
+ []string{"emojify"},
+ [][2]string{
+- {`{{ "I :heart: Hugo" | emojify }}`, `I Hugo`},
++ {`{{ "I :heart: Hugo" | emojify }}`, `I Hugo`},
+ },
+ )
+
+diff --git a/tpl/transform/transform_test.go b/tpl/transform/transform_test.go
+index ab3beb80..ee5da725 100644
+--- a/tpl/transform/transform_test.go
++++ b/tpl/transform/transform_test.go
+@@ -41,7 +41,7 @@ func TestEmojify(t *testing.T) {
+ expect interface{}
+ }{
+ {":notamoji:", template.HTML(":notamoji:")},
+- {"I :heart: Hugo", template.HTML("I Hugo")},
++ {"I :heart: Hugo", template.HTML("I Hugo")},
+ // errors
+ {tstNoStringer{}, false},
+ } {
+--
+2.20.1
+
diff --git a/hugo.spec b/hugo.spec
index 5c9db26..48921e5 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -12,6 +12,10 @@ URL: %{gourl}
Source0: %{gosource}
# Call rst2html directly instead of via 'python'.
Patch0001:
https://github.com/gohugoio/hugo/pull/5285.patch
+%if %{?fedora} > 29
+# Fix build against golang-github-kyokomi-emoji 2.1
+Patch0002: 0001-Fix-tests-against-latest-emoji-package.patch
+%endif
%description
Hugo is a static HTML and CSS website generator written in Go. It is optimized
commit 0fe58cafcd4cdefecadc0dd46a31501be908698b
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Thu Feb 28 02:14:20 2019 -0500
Update changelog.
diff --git a/hugo.spec b/hugo.spec
index ea9cc58..5c9db26 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -122,6 +122,9 @@ install -p -m 0755 _bin/hugo %{buildroot}%{_bindir}
%changelog
+* Thu Feb 28 2019 Elliott Sales de Andrade <quantum.analyst(a)gmail.com> - 0.38-4
+- Fix FTBFS (#1604348)
+
* Tue Feb 26 2019 Elliott Sales de Andrade <quantum.analyst(a)gmail.com> - 0.38-4
- Rewrite spec using latest template
commit 354aba701b22991392147e4e203a76cd5385273e
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Thu Feb 28 02:13:39 2019 -0500
Fix or skip failing tests.
diff --git a/5285.patch b/5285.patch
new file mode 100644
index 0000000..7d32e45
--- /dev/null
+++ b/5285.patch
@@ -0,0 +1,57 @@
+From b137ad4dbd6d14d0a9af68c044aaee61f2c87fe5 Mon Sep 17 00:00:00 2001
+From: Shreyansh Khajanchi <shreyansh_k(a)live.com>
+Date: Wed, 3 Oct 2018 19:45:54 +0530
+Subject: [PATCH] helpers/content.go: call rst2html directly on *nix but via
+ python on windows
+
+Initially, rst2html was called via the python interpreter which would
+fail if the script was wrapped in a launcher as on NixOS.
+Ideally, on *nix, binaries should be invoked directly to ensure that
+shebangs work properly as is being done now.
+Handle the case of windows as it doesn't do shebangs.
+---
+ helpers/content.go | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/helpers/content.go b/helpers/content.go
+index 55d8ce202..f8479cd1b 100644
+--- a/helpers/content.go
++++ b/helpers/content.go
+@@ -22,6 +22,7 @@ import (
+ "fmt"
+ "html/template"
+ "os/exec"
++ "runtime"
+ "unicode"
+ "unicode/utf8"
+
+@@ -678,7 +679,6 @@ func getPythonExecPath() string {
+ // getRstContent calls the Python script rst2html as an external helper
+ // to convert reStructuredText content to HTML.
+ func getRstContent(ctx *RenderingContext) []byte {
+- python := getPythonExecPath()
+ path := getRstExecPath()
+
+ if path == "" {
+@@ -688,8 +688,19 @@ func getRstContent(ctx *RenderingContext) []byte {
+
+ }
+ jww.INFO.Println("Rendering", ctx.DocumentName, "with", path,
"...")
+- args := []string{path, "--leave-comments",
"--initial-header-level=2"}
+- result := externallyRenderContent(ctx, python, args)
++ var result []byte
++ // certain *nix based OSs wrap executables in scripted launchers
++ // invoking binaries on these OSs via python interpreter causes SyntaxError
++ // invoke directly so that shebangs work as expected
++ // handle Windows manually because it doesn't do shebangs
++ if runtime.GOOS == "windows" {
++ python := getPythonExecPath()
++ args := []string{path, "--leave-comments",
"--initial-header-level=2"}
++ result = externallyRenderContent(ctx, python, args)
++ } else {
++ args := []string{"--leave-comments", "--initial-header-level=2"}
++ result = externallyRenderContent(ctx, path, args)
++ }
+ // TODO(bep) check if rst2html has a body only option.
+ bodyStart := bytes.Index(result, []byte("<body>\n"))
+ if bodyStart < 0 {
diff --git a/hugo.spec b/hugo.spec
index 854c6c8..ea9cc58 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -10,6 +10,8 @@ Summary: A Fast and Flexible Static Site Generator built with
love in GoL
License: ASL 2.0 and MIT
URL: %{gourl}
Source0: %{gosource}
+# Call rst2html directly instead of via 'python'.
+Patch0001:
https://github.com/gohugoio/hugo/pull/5285.patch
%description
Hugo is a static HTML and CSS website generator written in Go. It is optimized
@@ -85,6 +87,9 @@ which use import path with %{goipath} prefix.
# Replace blackfriday import path to avoid conflict with v2
sed -i
's|"github.com/russross/blackfriday|"gopkg.in/russross/blackfriday.v1|'
$(find . -name '*.go')
+# Skip test that assumes directory is in a git repository
+sed -i '/TestPageWithLastmodFromGitInfo/a t.Skip()' hugolib/page_test.go
+
%build
%gobuildroot
commit ba4f6c9c1e5630011fa6837e7eb00262c69ed731
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Thu Feb 28 02:12:57 2019 -0500
Add another missing test dependency.
diff --git a/hugo.spec b/hugo.spec
index ae101ea..854c6c8 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -65,6 +65,7 @@ BuildRequires: golang(gopkg.in/yaml.v2)
# These are used during tests
BuildRequires:
golang(github.com/fortytw2/leaktest)
+BuildRequires:
golang(github.com/sanity-io/litter)
BuildRequires:
golang(github.com/stretchr/testify/assert)
BuildRequires:
golang(github.com/stretchr/testify/require)
BuildRequires: python3-docutils
commit ce84e9b599c8c9705af743cd00aca5f542f4d7ed
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Thu Feb 28 02:12:05 2019 -0500
Patch in Blackfriday v1 paths.
diff --git a/hugo.spec b/hugo.spec
index f1bd777..ae101ea 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -45,7 +45,7 @@ BuildRequires:
golang(github.com/muesli/smartcrop)
BuildRequires:
golang(github.com/nicksnyder/go-i18n/i18n/bundle)
BuildRequires:
golang(github.com/nicksnyder/go-i18n/i18n/language)
BuildRequires:
golang(github.com/olekukonko/tablewriter)
-BuildRequires:
golang(github.com/russross/blackfriday)
+BuildRequires: golang(gopkg.in/russross/blackfriday.v1)
BuildRequires:
golang(github.com/spf13/afero)
BuildRequires:
golang(github.com/spf13/cast)
BuildRequires:
golang(github.com/spf13/cobra)
@@ -81,6 +81,9 @@ which use import path with %{goipath} prefix.
%prep
%forgeautosetup -p1
+# Replace blackfriday import path to avoid conflict with v2
+sed -i
's|"github.com/russross/blackfriday|"gopkg.in/russross/blackfriday.v1|'
$(find . -name '*.go')
+
%build
%gobuildroot
commit 78c6651845396258698dee94d72fb7cde822e54b
Author: Elliott Sales de Andrade <quantum.analyst(a)gmail.com>
Date: Tue Feb 26 04:33:20 2019 -0500
Rewrite spec using latest template.
diff --git a/hugo.spec b/hugo.spec
index 989f1c7..f1bd777 100644
--- a/hugo.spec
+++ b/hugo.spec
@@ -1,125 +1,26 @@
-# If any of the following macros should be set otherwise,
-# you can wrap any of them with the following conditions:
-# - %%if 0%%{centos} == 7
-# - %%if 0%%{?rhel} == 7
-# - %%if 0%%{?fedora} == 23
-# Or just test for particular distribution:
-# - %%if 0%%{centos}
-# - %%if 0%%{?rhel}
-# - %%if 0%%{?fedora}
-#
-# Be aware, on centos, both %%rhel and %%centos are set. If you want to test
-# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0
condition.
-# (Don't forget to replace double percentage symbol with single one in order to apply
a condition)
-
-# Generate devel rpm
-%global with_devel 1
-# Build project from bundled dependencies
-%global with_bundled 0
-# Build with debug info rpm
-%global with_debug 1
-# Run tests in check section
-%global with_check 1
-# Generate unit-test rpm
-%global with_unit_test 1
-
-%if 0%{?with_debug}
-%global _dwz_low_mem_die_limit 0
-%else
-%global debug_package %{nil}
-%endif
-
-%if ! 0%{?gobuild:1}
-%global gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od
-An -tx1|tr -d ' \\n')" -a -v -x %{?**};
-%endif
-
-%global provider github
-%global provider_tld com
-%global project gohugoio
-%global repo hugo
#
https://github.com/gohugoio/hugo
-%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
-%global import_path %{provider_prefix}
-# This commit is the 0.38 tag
-%global commit f7bc28c5291bda85e8d63433121dc903a6f7bf80
-%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global goipath
github.com/gohugoio/hugo
+Version: 0.38
+
+%gometa
Name: hugo
-Version: 0.38
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A Fast and Flexible Static Site Generator built with love in GoLang
License: ASL 2.0 and MIT
-URL: https://%{provider_prefix}
-Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{version}.tar.gz
-
-# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
-# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
-BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
-
-%if ! 0%{?with_bundled}
-# main.go
-BuildRequires:
golang(github.com/spf13/jwalterweatherman)
-
-# magefile.go
-# No need in BRing these
-# BuildRequires:
golang(github.com/magefile/mage/mg)
-# BuildRequires:
golang(github.com/magefile/mage/sh)
-
-# Remaining dependencies not included in main packages
-BuildRequires:
golang(github.com/yosssi/ace)
-BuildRequires:
golang(golang.org/x/text/unicode/norm)
-BuildRequires:
golang(github.com/alecthomas/chroma/formatters/html)
-BuildRequires:
golang(github.com/BurntSushi/toml)
-BuildRequires:
golang(github.com/hashicorp/go-immutable-radix)
-BuildRequires:
golang(github.com/russross/blackfriday)
-BuildRequires:
golang(golang.org/x/text/transform)
-BuildRequires:
golang(github.com/markbates/inflect)
-BuildRequires: golang(gopkg.in/yaml.v2)
-BuildRequires:
golang(github.com/mitchellh/mapstructure)
-BuildRequires:
golang(github.com/spf13/viper)
-BuildRequires:
golang(github.com/fsnotify/fsnotify)
-BuildRequires:
golang(github.com/spf13/fsync)
-BuildRequires:
golang(github.com/alecthomas/chroma)
-BuildRequires:
golang(github.com/spf13/afero)
-BuildRequires:
golang(github.com/spf13/cast)
-BuildRequires:
golang(github.com/alecthomas/chroma/lexers)
-BuildRequires:
golang(github.com/chaseadamsio/goorgeous)
-BuildRequires:
golang(github.com/nicksnyder/go-i18n/i18n/bundle)
-BuildRequires:
golang(github.com/nicksnyder/go-i18n/i18n/language)
-BuildRequires:
golang(github.com/kyokomi/emoji)
-BuildRequires:
golang(github.com/gorilla/websocket)
-BuildRequires:
golang(github.com/eknkc/amber)
-BuildRequires:
golang(github.com/spf13/cobra/doc)
-BuildRequires:
golang(github.com/alecthomas/chroma/styles)
-BuildRequires:
golang(github.com/spf13/pflag)
-BuildRequires:
golang(github.com/miekg/mmark)
-BuildRequires:
golang(github.com/jdkato/prose/transform)
-BuildRequires:
golang(github.com/PuerkitoBio/purell)
-BuildRequires:
golang(github.com/spf13/nitro)
-BuildRequires:
golang(github.com/alecthomas/chroma/formatters)
-BuildRequires:
golang(github.com/spf13/cobra)
-BuildRequires:
golang(github.com/bep/gitmap)
-BuildRequires:
golang(golang.org/x/image/webp)
-BuildRequires:
golang(github.com/disintegration/imaging)
-BuildRequires:
golang(github.com/gobwas/glob)
-BuildRequires:
golang(github.com/muesli/smartcrop)
-BuildRequires:
golang(github.com/olekukonko/tablewriter)
-BuildRequires:
golang(golang.org/x/net/context)
-BuildRequires:
golang(golang.org/x/sync/errgroup)
-%endif
+URL: %{gourl}
+Source0: %{gosource}
%description
Hugo is a static HTML and CSS website generator written in Go. It is optimized
for speed, easy use and configurability. Hugo takes a directory with content
and templates and renders them into a full HTML website.
-%if 0%{?with_devel}
-%package -n golang-%{provider}-%{project}-%{repo}-devel
+
+%package -n %{goname}-devel
Summary: %{summary}
BuildArch: noarch
-%if 0%{?with_check} && ! 0%{?with_bundled}
BuildRequires:
golang(github.com/BurntSushi/toml)
BuildRequires:
golang(github.com/PuerkitoBio/purell)
BuildRequires:
golang(github.com/alecthomas/chroma)
@@ -128,18 +29,22 @@ BuildRequires:
golang(github.com/alecthomas/chroma/formatters/html)
BuildRequires:
golang(github.com/alecthomas/chroma/lexers)
BuildRequires:
golang(github.com/alecthomas/chroma/styles)
BuildRequires:
golang(github.com/bep/gitmap)
-BuildRequires:
golang(github.com/markbates/inflect)
BuildRequires:
golang(github.com/chaseadamsio/goorgeous)
+BuildRequires:
golang(github.com/disintegration/imaging)
BuildRequires:
golang(github.com/eknkc/amber)
BuildRequires:
golang(github.com/fsnotify/fsnotify)
+BuildRequires:
golang(github.com/gobwas/glob)
BuildRequires:
golang(github.com/gorilla/websocket)
BuildRequires:
golang(github.com/hashicorp/go-immutable-radix)
BuildRequires:
golang(github.com/jdkato/prose/transform)
BuildRequires:
golang(github.com/kyokomi/emoji)
+BuildRequires:
golang(github.com/markbates/inflect)
BuildRequires:
golang(github.com/miekg/mmark)
BuildRequires:
golang(github.com/mitchellh/mapstructure)
+BuildRequires:
golang(github.com/muesli/smartcrop)
BuildRequires:
golang(github.com/nicksnyder/go-i18n/i18n/bundle)
BuildRequires:
golang(github.com/nicksnyder/go-i18n/i18n/language)
+BuildRequires:
golang(github.com/olekukonko/tablewriter)
BuildRequires:
golang(github.com/russross/blackfriday)
BuildRequires:
golang(github.com/spf13/afero)
BuildRequires:
golang(github.com/spf13/cast)
@@ -151,296 +56,66 @@ BuildRequires:
golang(github.com/spf13/nitro)
BuildRequires:
golang(github.com/spf13/pflag)
BuildRequires:
golang(github.com/spf13/viper)
BuildRequires:
golang(github.com/yosssi/ace)
-BuildRequires:
golang(golang.org/x/text/transform)
-BuildRequires:
golang(golang.org/x/text/unicode/norm)
-BuildRequires: golang(gopkg.in/yaml.v2)
BuildRequires:
golang(golang.org/x/image/webp)
-BuildRequires:
golang(github.com/disintegration/imaging)
-BuildRequires:
golang(github.com/gobwas/glob)
-BuildRequires:
golang(github.com/muesli/smartcrop)
-BuildRequires:
golang(github.com/olekukonko/tablewriter)
BuildRequires:
golang(golang.org/x/net/context)
BuildRequires:
golang(golang.org/x/sync/errgroup)
-%endif
-
-Requires:
golang(github.com/BurntSushi/toml)
-Requires:
golang(github.com/PuerkitoBio/purell)
-Requires:
golang(github.com/alecthomas/chroma)
-Requires:
golang(github.com/alecthomas/chroma/formatters)
-Requires:
golang(github.com/alecthomas/chroma/formatters/html)
-Requires:
golang(github.com/alecthomas/chroma/lexers)
-Requires:
golang(github.com/alecthomas/chroma/styles)
-Requires:
golang(github.com/bep/gitmap)
-Requires:
golang(github.com/markbates/inflect)
-Requires:
golang(github.com/chaseadamsio/goorgeous)
-Requires:
golang(github.com/eknkc/amber)
-Requires:
golang(github.com/fsnotify/fsnotify)
-Requires:
golang(github.com/gorilla/websocket)
-Requires:
golang(github.com/hashicorp/go-immutable-radix)
-Requires:
golang(github.com/jdkato/prose/transform)
-Requires:
golang(github.com/kyokomi/emoji)
-Requires:
golang(github.com/miekg/mmark)
-Requires:
golang(github.com/mitchellh/mapstructure)
-Requires:
golang(github.com/nicksnyder/go-i18n/i18n/bundle)
-Requires:
golang(github.com/nicksnyder/go-i18n/i18n/language)
-Requires:
golang(github.com/russross/blackfriday)
-Requires:
golang(github.com/spf13/afero)
-Requires:
golang(github.com/spf13/cast)
-Requires:
golang(github.com/spf13/cobra)
-Requires:
golang(github.com/spf13/cobra/doc)
-Requires:
golang(github.com/spf13/fsync)
-Requires:
golang(github.com/spf13/jwalterweatherman)
-Requires:
golang(github.com/spf13/nitro)
-Requires:
golang(github.com/spf13/pflag)
-Requires:
golang(github.com/spf13/viper)
-Requires:
golang(github.com/yosssi/ace)
-Requires:
golang(golang.org/x/text/transform)
-Requires:
golang(golang.org/x/text/unicode/norm)
-Requires: golang(gopkg.in/yaml.v2)
-Requires:
golang(golang.org/x/image/webp)
-Requires:
golang(github.com/disintegration/imaging)
-Requires:
golang(github.com/gobwas/glob)
-Requires:
golang(github.com/muesli/smartcrop)
-Requires:
golang(github.com/olekukonko/tablewriter)
-Requires:
golang(golang.org/x/net/context)
-Requires:
golang(golang.org/x/sync/errgroup)
-
-Provides: golang(%{import_path}/bufferpool) = %{version}-%{release}
-Provides: golang(%{import_path}/cache) = %{version}-%{release}
-Provides: golang(%{import_path}/commands) = %{version}-%{release}
-Provides: golang(%{import_path}/common/types) = %{version}-%{release}
-Provides: golang(%{import_path}/compare) = %{version}-%{release}
-Provides: golang(%{import_path}/config) = %{version}-%{release}
-Provides: golang(%{import_path}/create) = %{version}-%{release}
-Provides: golang(%{import_path}/deps) = %{version}-%{release}
-Provides: golang(%{import_path}/docshelper) = %{version}-%{release}
-Provides: golang(%{import_path}/helpers) = %{version}-%{release}
-Provides: golang(%{import_path}/hugofs) = %{version}-%{release}
-Provides: golang(%{import_path}/hugolib) = %{version}-%{release}
-Provides: golang(%{import_path}/i18n) = %{version}-%{release}
-Provides: golang(%{import_path}/livereload) = %{version}-%{release}
-Provides: golang(%{import_path}/media) = %{version}-%{release}
-Provides: golang(%{import_path}/metrics) = %{version}-%{release}
-Provides: golang(%{import_path}/output) = %{version}-%{release}
-Provides: golang(%{import_path}/parser) = %{version}-%{release}
-Provides: golang(%{import_path}/related) = %{version}-%{release}
-Provides: golang(%{import_path}/releaser) = %{version}-%{release}
-Provides: golang(%{import_path}/source) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/cast) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/collections) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/compare) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/crypto) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/data) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/encoding) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/fmt) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/images) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/inflect) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/lang) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/math) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/os) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/partials) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/safe) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/strings) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/time) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/tplimpl) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/transform) = %{version}-%{release}
-Provides: golang(%{import_path}/tpl/urls) = %{version}-%{release}
-Provides: golang(%{import_path}/transform) = %{version}-%{release}
-Provides: golang(%{import_path}/utils) = %{version}-%{release}
-Provides: golang(%{import_path}/watcher) = %{version}-%{release}
-Provides: golang(%{import_path}/resource) = %{version}-%{release}
-
-%description -n golang-%{provider}-%{project}-%{repo}-devel
-%{summary}
-
-This package contains library source intended for
-building other packages which use import path with
-%{import_path} prefix.
-%endif
-
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%package -n golang-%{provider}-%{project}-%{repo}-unit-test-devel
-Summary: Unit tests for %{name} package
-%if 0%{?with_check}
-#Here comes all BuildRequires: PACKAGE the unit tests
-#in %%check section need for running
-%endif
-
-# test subpackage tests code from devel subpackage
-Requires: golang-%{provider}-%{project}-%{repo}-devel = %{version}-%{release}
+BuildRequires:
golang(golang.org/x/text/transform)
+BuildRequires:
golang(golang.org/x/text/unicode/norm)
+BuildRequires: golang(gopkg.in/yaml.v2)
-%if 0%{?with_check} && ! 0%{?with_bundled}
+# These are used during tests
BuildRequires:
golang(github.com/fortytw2/leaktest)
BuildRequires:
golang(github.com/stretchr/testify/assert)
BuildRequires:
golang(github.com/stretchr/testify/require)
-%endif
-
-Requires:
golang(github.com/fortytw2/leaktest)
-Requires:
golang(github.com/stretchr/testify/assert)
-Requires:
golang(github.com/stretchr/testify/require)
-
-# These are used during hugolib tests
-%%if 0%{?with_check}
BuildRequires: python3-docutils
BuildRequires: python3-pygments
BuildRequires: rubygem-asciidoctor
-Requires: python3-docutils
-Requires: python3-pygments
-Requires: rubygem-asciidoctor
-%%endif
-%description -n golang-%{provider}-%{project}-%{repo}-unit-test-devel
+%description -n %{goname}-devel
%{summary}
-This package contains unit tests for project
-providing packages with %{import_path} prefix.
-%endif
+This package contains library source intended for building other packages
+which use import path with %{goipath} prefix.
+
%prep
-%setup -q -n %{repo}-%{commit}
+%forgeautosetup -p1
+
%build
-mkdir -p src/%{provider}.%{provider_tld}/%{project}
-ln -s ../../../ src/%{import_path}
+%gobuildroot
-%if ! 0%{?with_bundled}
-export GOPATH=$(pwd):%{gopath}
-%else
-# No dependency directories so far
-export GOPATH=$(pwd):%{gopath}
-%endif
+%gobuild -o _bin/hugo %{goipath}
-%gobuild -o bin/hugo %{import_path}/
%install
+%goinstall
+
install -d -p %{buildroot}%{_bindir}
-install -p -m 0755 bin/hugo %{buildroot}%{_bindir}
-
-# source codes for building projects
-%if 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
-# find all *.go but no *_test.go files and generate devel.file-list
-for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname
"*_test.go") ; do
- dirprefix=$(dirname $file)
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
-
- while [ "$dirprefix" != "." ]; do
- echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >>
devel.file-list
- dirprefix=$(dirname $dirprefix)
- done
-done
-%endif
-
-# testing files for this project
-%if 0%{?with_unit_test} && 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-# find all *_test.go files and generate unit-test-devel.file-list
-for file in $(find . -iname "*_test.go") ; do
- dirprefix=$(dirname $file)
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >>
unit-test-devel.file-list
-
- while [ "$dirprefix" != "." ]; do
- echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >>
devel.file-list
- dirprefix=$(dirname $dirprefix)
- done
-done
-# install data used for tests
-cp -pav ./hugolib/testdata %{buildroot}/%{gopath}/src/%{import_path}/hugolib/
-echo "%%{gopath}/src/%%{import_path}/hugolib/testdata" >>
unit-test-devel.file-list
-cp -pav ./resource/testdata %{buildroot}/%{gopath}/src/%{import_path}/resource/
-echo "%%{gopath}/src/%%{import_path}/resource/testdata" >>
unit-test-devel.file-list
-
-%endif
-
-%if 0%{?with_devel}
-sort -u -o devel.file-list devel.file-list
-%endif
+install -p -m 0755 _bin/hugo %{buildroot}%{_bindir}
+
%check
-%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
-%if ! 0%{?with_bundled}
-export GOPATH=%{buildroot}/%{gopath}:%{gopath}
-%else
-# No dependency directories so far
-
-export GOPATH=%{buildroot}/%{gopath}:%{gopath}
-%endif
-
-%if ! 0%{?gotest:1}
-%global gotest go test
-%endif
-
-%gotest %{import_path}/bufferpool
-%gotest %{import_path}/cache
-%gotest %{import_path}/commands
-%gotest %{import_path}/common/types
-%gotest %{import_path}/create
-%gotest %{import_path}/helpers
-%gotest %{import_path}/hugofs
-%gotest %{import_path}/hugolib
-%gotest %{import_path}/i18n
-%gotest %{import_path}/media
-%gotest %{import_path}/metrics
-%gotest %{import_path}/output
-%gotest %{import_path}/parser
-%gotest %{import_path}/related
-# We do not want to test upstream release process (needs git repo)
-# %%gotest %%{import_path}/releaser
-%gotest %{import_path}/source
-%gotest %{import_path}/tpl/cast
-%gotest %{import_path}/tpl/collections
-%gotest %{import_path}/tpl/compare
-%gotest %{import_path}/tpl/crypto
-%gotest %{import_path}/tpl/data
-%gotest %{import_path}/tpl/encoding
-%gotest %{import_path}/tpl/fmt
-%gotest %{import_path}/tpl/images
-%gotest %{import_path}/tpl/inflect
-%gotest %{import_path}/tpl/internal
-%gotest %{import_path}/tpl/lang
-%gotest %{import_path}/tpl/math
-%gotest %{import_path}/tpl/os
-%gotest %{import_path}/tpl/partials
-%gotest %{import_path}/tpl/safe
-%gotest %{import_path}/tpl/strings
-# A test depends on the host timezone, we do now want to test it.
+# releaser: We do not want to test upstream release process (needs git repo)
+# tpl/time: A test depends on the host timezone, we do now want to test it.
# time_test.go:49: [3] DateFormat failed: Unable to Cast 1421733600 to Time # line 35
returns different results
-# %%gotest %%{import_path}/tpl/time
-%gotest %{import_path}/tpl/tplimpl
-%gotest %{import_path}/tpl/transform
-%gotest %{import_path}/tpl/urls
-%gotest %{import_path}/transform
-%gotest %{import_path}/resource
-%endif
+%gochecks -d releaser -d tpl/time
-#define license tag if not already defined
-%{!?_licensedir:%global license %doc}
%files
%license LICENSE.md
%doc CONTRIBUTING.md README.md
%{_bindir}/hugo
-%if 0%{?with_devel}
-%files -n golang-%{provider}-%{project}-%{repo}-devel -f devel.file-list
+%files -n %{goname}-devel -f devel.file-list
%license LICENSE.md
%doc CONTRIBUTING.md README.md
-%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
-%endif
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%files -n golang-%{provider}-%{project}-%{repo}-unit-test-devel -f
unit-test-devel.file-list
-%license LICENSE.md
-%doc CONTRIBUTING.md README.md
-%endif
%changelog
+* Tue Feb 26 2019 Elliott Sales de Andrade <quantum.analyst(a)gmail.com> - 0.38-4
+- Rewrite spec using latest template
+
* Fri Feb 01 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.38-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
@@ -536,4 +211,3 @@ export GOPATH=%{buildroot}/%{gopath}:%{gopath}
* Sun Feb 26 2017 Athos Ribeiro <athoscr(a)fedoraproject.org> - 0.18.1-1
- Initial package
-
diff --git a/sources b/sources
index af6b933..0e10538 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (hugo-0.38.tar.gz) =
232c193612130f894e12514e5cb7a9a8e66f98e55440ea2a6667692d6eada5cdafd0e11dcfacc174f42aae9af68b37592f45cea18a4a1ba5a779956780923df7
+SHA512 (hugo-0.38.tar.gz) =
5b6c089e8c04dc610b02c17fed8c68b4fb87c6af5c78f48604e6a46c380f834793651c3cc94da83233fd521225c5ed4c7c7ea35124fea322157d9e5de9217a40