Commit Graph

88 Commits

Author SHA1 Message Date
Jarek Radosz 53d1e4f697
remove debug 2025-02-25 19:35:41 +01:00
Jarek Radosz 10e3f533d0
still failing but progress is being made 2025-02-25 19:34:07 +01:00
Jarek Radosz 92ac6cbc9b
DEV: Update ImageMagick to 7.1.1-43 (#929)
We could use a bump, after two years since the last one.
2025-01-28 12:07:56 +01:00
Jarek Radosz 79ccbcc532
DEV: Update the workflow to Ubuntu 24.04 (#928)
The current LTS
2025-01-28 08:58:35 +08:00
Jeff Wong 5ed07ecc93
Imagemagick enable delegate build and disabled using shared libraries (#889)
compiles to a single portable binary

Create a base builder package with compile time dependencies. Create an
imagemagick_builder to build imagemagick.

The base builder can be extended for other builders.

Add imagemagick runtime dependencies to discourse_dependencies image
avoid -dev libs

Statically compile as much as possible with --disable-shared and
--enable-delegate-build flags.
References:
https://stackoverflow.com/questions/47031789/imagemagick-100-static-build-for-linux
https://www.imagemagick.org/discourse-server/viewtopic.php?t=14259

Add fonts-urw-base35 for NimbusSans-Regular, needed for letter avatar generation

Copy over the resulting magick bin, as well as etc and share files from the
compilation. etc is needed for magick to run, share is not, but contains
translations for errors which Discourse tests are dependent on reading from.

Create symlinks for other magick tooling - imagemagick creates symlink tool
names that Discourse uses. These *could* be dropped if Discourse decided to use
`magick {toolname}` rather than `{toolname}`.

Add nginx compile dependency - building nginx still needs libfreetype6
This was implicitly installed previously. Removing the imagemagick build from
base broke the next nginx build. Add this dependency back in. This dependency
can be removed once we build nginx separately as well.
2024-12-17 13:28:54 +08:00
Alan Guo Xiang Tan 21a0351e30
Build `discourse/base` and `discourse/discourse_test` image for bookworm (#823)
We need to upgrade to bookworm because bullseye is EOL. This commit when merged into branch will push the following images to Docker hub:

1. `discourse/base:slim-bookworm`
2. `discourse/base:release-bookworm`
3. `discourse/discourse_test:slim-bookworm`
4. `discourse/discourse_test:slim-browsers-bookworm`
5. `discourse/discourse_test:release-bookworm`
2024-08-08 16:29:53 +08:00
Kelv 3654acb2da
DEV: update to use IM7 syntax magick in validation command (#814) 2024-07-08 17:34:01 +08:00
Alan Guo Xiang Tan fcc6326c22
Revert "Upgrade Debian to Bookworm" (#788)
This reverts commit 23e7b55d42.

The CI build on `discourse/discourse` and our internal CI is broken
because of this.
2024-03-27 06:32:09 +08:00
Loïc Guitaut 23e7b55d42 Upgrade Debian to Bookworm 2024-03-26 16:43:03 +01:00
Alan Guo Xiang Tan 7cc301e9a9
PERF: Speed up building slim image by setting --jobs to number of cores (#770)
On a M3 Max macbook pro with 14 cores,

Before:

```
=> [25/44] RUN /tmp/install-imagemagick                                 150.6s
=> [27/44] RUN /tmp/install-jemalloc                                     54.9s
=> [31/44] RUN /tmp/install-redis                                        42.9s
```

After:

```
=> [25/44] RUN /tmp/install-imagemagick                                  44.4s
=> [27/44] RUN /tmp/install-jemalloc                                     13.7s
=> [31/44] RUN /tmp/install-redis                                        11.7s
```
2024-02-06 16:38:04 +08:00
Alan Guo Xiang Tan a03cdcb257
PERF: Use `-O2` gcc compilation flag for imagemagick (#768)
Why this change?

We have noticed that our compiled imagemagick binary is slower than the
distributed binaries in the same environment and started debugging why.
One thing I noticed is that distributed binaries usually include the
`-O2` gcc compilation flag. When applying it locally, I saw significant
speed up.

Without -O2 flag:

```
root@1d7277f72a4f:/# time convert -limit memory 10GiB -limit disk 10GiB -size $(seq 8000 8500 | shuf | head -n1)x9000 xc:"rgb($(shuf -i 0-255 -n1),$(shuf -i 0-255 -n1),$(shuf -i 0-255 -n1))" random_image.png

real	0m3.376s
user	0m6.355s
sys	0m0.410s
root@1d7277f72a4f:/# time identify -format "%Q" random_image.png
92
real	0m1.018s
user	0m0.883s
sys	0m0.135s
```

With -O2 flag:

```
root@0779afa71102:/# time convert -limit memory 10GiB -limit disk 10GiB -size $(seq 8000 8500 | shuf | head -n1)x9000 xc:"rgb($(shuf -i 0-255 -n1),$(shuf -i 0-255 -n1),$(shuf -i 0-255 -n1))" random_image.png

real	0m1.118s
user	0m1.555s
sys	0m1.680s
root@0779afa71102:/# time identify -format "%Q" random_image.png
92
real	0m0.330s
user	0m0.197s
sys	0m0.133s
```
2024-02-06 07:43:15 +08:00
Blake Erickson 3d3b7c8584
DEV: Ubuntu installs do not like bullseye-backports (#698)
Check for Ubuntu 22.04 and 22.10 versions before trying to use
`bullseye-backports` otherwise they throw this error.

```
E: The value 'bullseye-backports' is invalid for APT::Default-Release as
such a release is not available in the sources failed
```
2023-03-26 07:12:01 -06:00
Gabe Pacuilla 48dca72779
DEV: update ImageMagick to 7.1.0-62 (#679) 2023-02-13 23:01:50 -05:00
Rafael dos Santos Silva 1dc7ce451d Add explicit SVG delete to ImageMagick 2023-01-13 00:09:41 -03:00
Rafael dos Santos Silva 9cd1d8a338 Update Ruby to 3.1.3 and deps bump 2022-12-21 06:23:16 +08:00
Rafael dos Santos Silva c562672f9a Revert "bump deps"
This reverts commit b1d243400c.
2022-12-21 06:23:16 +08:00
Rafael dos Santos Silva b1d243400c bump deps 2022-12-20 17:37:35 -03:00
Glenn Adams 30be122eb7 Ubuntu Jammy (22.04) doesn't have libwebp6
Conditionally use libwebp7 on Jammy. N.B. This conditionalization should probably be generalized.
2022-09-27 10:59:14 -03:00
Gabe Pacuilla 93906f14f4
DEV: use consistent third-party installation method (#610)
* DEV: use consistent third-party installation method

* FIX: slim base image build on aarch64
2022-03-14 19:22:43 -04:00
Jarek Radosz dc5b37c011 Fix checksums 2022-02-15 10:14:45 -03:00
Jarek Radosz 738aabaa73 DEV: Update ImageMagick 2022-02-15 10:14:45 -03:00
Rafael dos Santos Silva 2ff713ba3a try building an image for aarch64 2021-12-02 17:19:43 -03:00
Michael Fitz-Payne aadd087790
Update dependencies (#573) 2021-10-19 12:33:03 +10:00
Rafael dos Santos Silva 8b3e8f7dc8 Update dependencies 2021-09-06 18:18:23 -03:00
Rafael dos Santos Silva 1087cb2432 Bump deps 2021-05-28 13:54:21 -03:00
Penar Musaraj 9a4400bc13
Remove Svgo, update ImageMagick, Redis, Libheif (#533) 2021-04-08 11:34:29 -04:00
Rafael dos Santos Silva 69585bf702 Re-add removed packages 2021-01-27 18:24:42 -03:00
Rafael dos Santos Silva ebe8954d32 Make script work on ubuntu and debian 2021-01-27 17:34:30 -03:00
Rafael dos Santos Silva 6b35438db8 No inline comments in bash 2021-01-27 16:56:49 -03:00
Rafael dos Santos Silva 3f3d73226a Update ImageMagick build
- Use libpng from package manager
- Update libheif
- Update ImageMagick
- Adds libaom so libheif and IM can deal with AVIF image format
2021-01-27 15:27:41 -03:00
Rafael dos Santos Silva d3bb191229
Adds WEBP support in ImageMagick (#506) 2020-12-18 14:34:54 -03:00
Penar Musaraj 574c0509ef
Update dependencies: nginx, redis, imagemagick (#475)
- Redis from 5.0.5 to 5.0.9
- Nginx from 1.17.9 to 1.18.0
- ImageMagick from 7.0.10-6 to 7.0.10-24
2020-07-24 09:09:15 -04:00
Penar Musaraj c53ee530a7
Build libheif from source for Ubuntu (#474) 2020-07-15 12:04:58 -04:00
Penar Musaraj 8dc661f5a1
Add HEIF conversion support to ImageMagick (#473) 2020-07-10 09:20:52 -04:00
Michael Brown 896202973f Add hash checks to downloaded source files
* we had one in place for redis but nowhere else
2020-04-09 14:58:32 -03:00
Michael Brown 8c7a9f14b7 Bump ImageMagick and nginx versions 2020-04-09 14:58:32 -03:00
Sam Saffron 416467f6ea SECURITY: base image updates
- Ruby upgraded from 2.6.4 -> 2.6.5 to address CVEs
- Image Magick from 7.0.8-61 -> 66
- NGINX 1.17.3 -> 4 (bug fixes only)
2019-10-04 09:59:17 +10:00
Rafael dos Santos Silva f787e00690 Update dependencies 2019-08-22 17:05:41 -03:00
Rafael dos Santos Silva b95ea6f77a Revert "Revert "First pass in moving to debian""
This reverts commit 29204e4158.
2019-08-19 15:17:01 -03:00
Rafael dos Santos Silva 29204e4158 Revert "First pass in moving to debian"
This reverts commit 223b69e775.
2019-08-16 18:03:14 -03:00
Rafael dos Santos Silva 223b69e775 First pass in moving to debian 2019-08-16 14:57:36 -03:00
Gerhard Schlager 760fbf0c41 Update ImageMagick 2019-06-25 10:53:51 +02:00
Sam Saffron 6515dc3582 DEV: bump dependencies
- new ImageMagick
- new NGINX moved to stable from mailine
- new Redis
- new PNG Quant
- updated libjemalloc
2019-06-18 16:14:38 +10:00
Gerhard Schlager ff9ddabe38 Update dependencies (#429)
* Ruby 2.6.3 which has a couple of Unicode improvements

* nginx from 1.5.9 to 1.5.12 (http://nginx.org/en/CHANGES)

* ImageMagick 7.0.8-42 and switch it back to using GitHub, because only the latest release is available on the official site and this regularly breaks our build

* libpng from 1.6.36 to 1.6.37 (security fix)

* gifsicle from 1.91 to 1.92 (http://www.lcdf.org/gifsicle/changes.html)

* Node.js v10, the latest active LTS (https://nodejs.org/en/about/releases/)
2019-04-27 18:08:16 +10:00
Guo Xiang Tan 421c1af164
Update imagemagick to 7.0.8-41. 2019-04-22 11:02:10 +08:00
Guo Xiang Tan ee207cb4d2
Bump patch for imagemagick again. 2019-04-15 09:23:58 +08:00
Guo Xiang Tan f727e7c8f4
Bump imagemagick to 7.0.8-39. 2019-04-08 08:14:46 +08:00
Guo Xiang Tan ade283329c
Update imagemagick patch version. 2019-03-28 14:30:14 +08:00
Sam Saffron 1eea5fbcc8 Pull ImageMagick and libpng from official site
previously we were taking stuff from GitHub which is often out-of-date
2019-03-21 11:38:43 +11:00
Sam Saffron e2142abf82 oops, 1.6.37 is not tagged yet use 36 2019-03-21 11:12:29 +11:00