FFe: Sync hugo 0.37-2 (universe) from Debian unstable (main)

Bug #1753180 reported by Dr. Tobias Quathamer
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
hugo (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Dear release team,

please grant a freeze exception for hugo. We've tried very hard in Debian to upload it in time for the DebianImportFreeze, however, we've missed the deadline by a few hours.

Upstream would be delighted to have the current hugo version (0.37) in Ubuntu -- especially as this release will be an LTS release. Please see the upstream issue for some details:

https://github.com/gohugoio/hugo/issues/4350

Hugo needs another package as build dependency, namely golang-github-alecthomas-chroma, which would need a Freeze Exception as well to get the most recent version into Bionic. I've filed a bug for that, too:

https://bugs.launchpad.net/ubuntu/+source/golang-github-alecthomas-chroma/+bug/1753179

The changelog from the hugo version in Bionic (0.35-1) to the latest upstream is here:

== Hugo 0.36 ==

Hugo 0.36 announces smart cropping of images, using the library created by muesli.

Hugo now defaults to smart crop when cropping images, if you don't specify it when calling .Fill.

Also, we have removed the superflous anchor name from the processed filenames that does not use this anchor, so it can be wise to run hugo --gc once to remove unused images.

Enhancements

    Add smart cropping 722086b4 @bep #4375

Fixes

    Ensure site templates can override theme templates 084cf419 @moorereason #3505
    Add additional test to TestTemplateLookupOrder fc06d5c1 @moorereason #3505
    Fix broken TestTemplateLookupOrder 9a367d9d @moorereason
    Fix JSON array-based data file handling regression 4402c077 @vassudanagunta #4361
    Increase data directory test coverage 4743de0d @vassudanagunta #4138

== Hugo 0.36.1 ==

This release fixes a multi-thread issue when reprocessing and reusing images across pages.

This error was rare (no reports on GitHub or the discussion forum), but very hard to debug for the end user.

    Fix multi-threaded image processing issue d8fdffb5 @bep #4404
    Improve error message in .Render 08521dac @bep
    Bump Travis/Snapcraft to Go 1.9.4 fc23a80f @bep
    Improve error processing error message 2851af02 @bep

== Hugo 0.37 ==

The main item in Hugo `0.37` is that we now properly preserve the colour palette when processing `PNG` images. We got reports from users experiencing their `PNG` images getting bigger in file size when scaled down. Now, if you, as an example, start out with a carefully chosen 8 bit colour palette (i.e. `PNG-8`), this is now what you will end up with.

Notes

    Hugo will now convert non-string YAML map keys to string. See #4393 for more information. You will get a WARNING in the console if you are touched by this.
    We have improved the PNG processing, and have incremented the version numbers on the URL for the processed PNG image. This will just work, but you may want to run hugo --gc to clean up some old stale images in the resource cache.

Enhancements

Templates

    Add template func for TOML/JSON/YAML docs examples conversion. This is mainly motivated by the needs of the Hugo docs site. d382502d @bep #4389

Core

    Refactor tests for JSON, YAML and TOML equivalency, add coverage 82eefded @vassudanagunta
    Re-enable YAML data tests disabled in f554503f e1728349 @vassudanagunta

Other

    Preserve color palette for PNG images 799c654b @bep #4416
    Use Floyd-Steinberg dithering for PNGs 13ea1e7c @bep #4453
    Make ge, le etc. work with the Hugo Version number 0602135f @bep #4443
    Update dependencies eaf573a2 @bep #4418
    Update to Go 1.10 (!) Take 2 a3f26e56 @bep
    Update to Go 1.10 (!) ff10c15a @bep
    Add WARNING for integer YAML keys 0816a97a @bep #4393
    Tune stringifyMapKeys 10a917df @bep
    Rename stringifyYAMLMapKeys to stringifyMapKeys d4beef0d @bep
    Add benchmarks for stringifyYAMLMapKeys 51213e0b @bep
    Add support for YAML array data files 1fa24177 @vassudanagunta #3890
    Account for array type data in data dir merge/override logic bb549a0d @vassudanagunta #4366
    Add "target" and "rel" parameters to figure shortcode 2e95ec68 @kaushalmodi
    image" property, not "twitter:image:src" 76d38d5e @kaushalmodi

Fixes

Core

    Continue GitInfo lookup on error e9750d83 @bep
    Fix paginator URL for sections with URL in front matter 9f740b37 @bep #4415

Other

    Fix bug in Site.assembleSections method 00868081 @vassudanagunta #4447
    Update Blackfriday to fix footnote HTML5 validation error 492fea7c @bep #4433
    Fix YAML maps key type 16a5c745 @dmgawel #2441
    Remove ERROR on missing baseURL 55bd46a6 @bep #4397

You can also view the changes in the upstream git repository, even with a nice formatting and some links:

https://github.com/gohugoio/hugo/blob/master/docs/content/news/0.36-relnotes/index.md
https://github.com/gohugoio/hugo/blob/master/docs/content/news/0.36.1-relnotes-ready.md
https://github.com/gohugoio/hugo/blob/master/docs/content/news/0.37-relnotes/index.md

Regards,
Tobias

tags: added: upgrade-software-version
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I approve the feature freeze exception for including hugo 0.37 in bionic. Please upload the package as soon as it's ready.

Changed in hugo (Ubuntu):
status: New → Triaged
Revision history for this message
Dr. Tobias Quathamer (toddy) wrote :

Hi Łukasz,

thanks a lot for your consideration!

However, I cannot upload this package to Ubuntu -- can't this just be synced from Debian? Both packages are readily available from Debian Sid. (golang-github-alecthomas-chroma 0.3.0-1 and hugo 0.37-1).

I'm not familiar with the Ubuntu Freeze process, but I had hoped that there's just a "manual sync" necessary.

Regards,
Tobias

Revision history for this message
Dr. Tobias Quathamer (toddy) wrote :

... it's hugo 0.37-2, not -1. Sorry.

Revision history for this message
Anthony Fok (foka) wrote :

Please note that hugo 0.37 requires a newer version of golang-github-russross-blackfriday-dev (src:golang-blackfriday) 1.5.1-1. This is part of the fixes found in Hugo 0.37:

    Update Blackfriday to fix footnote HTML5 validation error
    (492fea7c @bep #4433)

I originally thought src:golang-blackfriday 1.5.1-1 didn't make it before the DebianImportFreeze, but it turns out it is just "hidden" in bionic-proposed, as seen here: https://launchpad.net/ubuntu/+source/golang-blackfriday

Do we need to file a bug report for src:golang-blackfriday to have it moved from "proposed" to "release"? Thank you very much for your advice.

Oh, and if it is okay, please wait a couple more days for hugo 0.37.1-1 (or 0.37-3 with a backported fix) to land in Debian first, for this fix:

  resource: Fix SVG and similar resource handling
  https://github.com/gohugoio/hugo/commit/ba94abbf5dd90f989242af8a7027d67a572a6128

Many thanks!

P.S. Thank you very much, Tobias, for filing this "Debian sync" request for Hugo. :-)

Anthony Fok (foka)
summary: - Freeze exception
+ Freeze exception: Please sync hugo 0.37.1-1 (coming soon) from Debian
Anthony Fok (foka)
summary: Freeze exception: Please sync hugo 0.37.1-1 (coming soon) from Debian
+ sid main
Anthony Fok (foka)
summary: - Freeze exception: Please sync hugo 0.37.1-1 (coming soon) from Debian
- sid main
+ FFe: Please sync hugo 0.37.1-1 (universe, coming soon) from Debian
+ unstable (main)
summary: - FFe: Please sync hugo 0.37.1-1 (universe, coming soon) from Debian
- unstable (main)
+ FFe: Sync hugo 0.37.1-1 (universe, coming soon) from Debian unstable
+ (main)
Revision history for this message
Simon Quigley (tsimonq2) wrote : Re: FFe: Sync hugo 0.37.1-1 (universe, coming soon) from Debian unstable (main)

This bug was fixed in the package hugo - 0.37-2
Sponsored for Anthony Fok (foka)

---------------
hugo (0.37-2) unstable; urgency=medium

  * Depend on golang-github-alecthomas-chroma (>= 0.3.0)
    just as the upstream Hugo 0.37 does, for fixing a bug in yaml
    highlighting. See https://github.com/gohugoio/hugo/issues/4418
    and https://github.com/alecthomas/chroma/issues/119.

 -- Anthony Fok <email address hidden> Thu, 01 Mar 2018 23:55:47 -0700

hugo (0.37-1) unstable; urgency=medium

  [ Dr. Tobias Quathamer ]
  * New upstream version 0.37

  [ Anthony Fok ]
  * Add new dependency: golang-github-muesli-smartcrop-dev
    and newer version of golang-github-russross-blackfriday-dev (>= 1.5.1-1~)
  * Add BuildDate (honoring SOURCE_DATE_EPOCH) to hugo
  * Update debian/copyright:
     - Add new docs/src/package-lock.json
     - Document the Vernon Adams' authorship of Muli font
     - Add a comment about the original source URL of gohugoioTheme
     - Add copyright info for docs/themes/gohugoioTheme/src/js/hljs.js
       and provide a reconstructed uncompressed source file
     - Add missing sources for app.bundle.js and document their origins

 -- Anthony Fok <email address hidden> Thu, 01 Mar 2018 12:20:58 -0700

Changed in hugo (Ubuntu):
status: Triaged → Fix Released
Anthony Fok (foka)
summary: - FFe: Sync hugo 0.37.1-1 (universe, coming soon) from Debian unstable
- (main)
+ FFe: Sync hugo 0.37-2 (universe) from Debian unstable (main)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/h/hugo/20180308_004839_58c01@/log.gz -> I'm going to take a wild guess that this is happening because of the png optimization that happens during the build

Revision history for this message
Anthony Fok (foka) wrote :

> https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/h/hugo/20180308_004839_58c01@/log.gz
>
> -> I'm going to take a wild guess that this is happening
> because of the png optimization that happens during the build

Thank you for the insight, Michael! It does look like that's what happened, especially because of the apparent smaller image size:

"/a/gohugoio_hu0e1b9e4a4be4d6f86c7b37b9ccce3fbc_73886_800x0_resize_linear_2.png"

"/a/gohugoio_hu9787b44213e9e337404766d6421313b3_65299_800x0_resize_linear_2.png"

The same TestImageResize8BitPNG passes on Debian buildd and ci.debian.net.
Are you implying that there is a PNG optimization that is introduced as part of the Ubuntu Autopkgtest or by its particular build environment?

Many thanks for shedding light in this mystery. :-)

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

It's a difference between Ubuntu and Debian's build environments afaict (well, debhelper packages), Ubuntu runs pkgstripfiles from pkgbinarymangler at the end of the build and one of the things that does is to compress PNG files harder. It can be disabled by setting NO_PNG_PKG_MANGLE to something non-empty, or I guess the test could be fixed to not care about the md5 or whatever of the PNG file.

Changed in hugo (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Anthony Fok (foka) wrote :

> It's a difference between Ubuntu and Debian's build environments
> afaict (well, debhelper packages), Ubuntu runs pkgstripfiles from
> pkgbinarymangler at the end of the build and one of the things
> that does is to compress PNG files harder.

Thanks for the enlightenment!

> It can be disabled by setting NO_PNG_PKG_MANGLE to something
> non-empty, or I guess the test could be fixed to not care about
> the md5 or whatever of the PNG file.

I love the "export NO_PNG_PKG_MANGLE=1" solution! :-)
I will add that to debian/rules in my upcoming upload of
hugo 0.37.1-1 (which fixes a regression in 0.37)
while awaiting the following sync requests to go through:

 * golang-fsnotify (1.4.7-1)
   https://bugs.launchpad.net/bugs/1753767

 * golang-github-spf13-pflag (1.0.0-1)
   https://bugs.launchpad.net/bugs/1754433

 * golang-github-jdkato-prose (1.1.0+git20171031.e27abfd-2)
   https://bugs.launchpad.net/bugs/1754468

Revision history for this message
Anthony Fok (foka) wrote :

I changed my mind about waiting for fsnotify/pflag/prose after receiving two automated emails from the Ubuntu Release Team reminding me that both golang-github-chaseadamsio-goorgeous 2.0.0+git20171126.dcf1ef8-2 and hugo 0.37-2 (and also golang-blackfriday 1.5.1-1 which got in before the Feature Freeze / Debian Import Freeze) are stuck in bionic-proposed.

Thus, I have uploaded hugo 0.37.1-1 with "export NO_PNG_PKG_MANGLE=1" added, and have requested a sync to hopefully get these three packages unstuck. Please follow up
on the new sync request at

https://bugs.launchpad.net/bugs/1754531

Cheers!

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting.

I haven't followed the complete discussion, but now that hugo 0.37.1-1 is available in Ubuntu bionic, I believe this is fixed. (Or possibly superseded by bug 1754531 where the newer version was synced...)

Changed in hugo (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.