Add 7.0.0 - #424
Conversation
| # redmine needs a rails update that includes https://github.com/rails/rails/pull/57266 | ||
| # before it will handle the renamed timezones (they just fail to show in the redmine selector) | ||
| if env.variant == "trixie" and IN(env.version; "6.0", "6.1") then | ||
| if env.variant == "trixie" and IN(env.version; "6.0", "6.1", "7.0") then |
There was a problem hiding this comment.
This is still needed because there isn't even a rails release with the fix.
|
Still working through the failures: it looks like we'll have to drop a few architectures from Debian Bookworm images since it doesn't have a new enough rust available; for Trixie, we can use backports to get a new enough rust. |
+ runDeps='so:libc.musl-x86_64.so.1
so:libcrypto.so.3
so:libgcc_s.so.1
so:libmariadb.so.3
so:libpq-ruby-pg.so.1
so:libssl.so.3
so:libsybdb.so.5'
+ apk add --no-network --virtual .redmine-rundeps so:libc.musl-x86_64.so.1 so:libcrypto.so.3 so:libgcc_s.so.1 so:libmariadb.so.3 so:libpq-ruby-pg.so.1 so:libssl.so.3 so:libsybdb.so.5
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.23/main/x86_64/APKINDEX.tar.gz: No such file or directory
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.23/community/x86_64/APKINDEX.tar.gz: No such file or directory
ERROR: unable to select packages:
.redmine-rundeps-20260701.170400:
masked in: cache
satisfies: world[.redmine-rundeps=20260701.170400]
so:libpq-ruby-pg.so.1 (no such package):
required by: .redmine-rundeps-20260701.170400[so:libpq-ruby-pg.so.1]The scanelf/awk change is to fix this error (the ruby-pg gem now bundles its own |
|
I don't fully understand: is there a showstopper or does the suggested fix work, but hasn't been merged yet? |
|
The workarounds necessary here are heinous and point to / are likely hiding much deeper problems that we'd like to dig into further before we blindly accept them. |
|
I understand and agree: no rush, quality first. I wish for success, thanks for your work. |
|
Just so that I put it somewhere, here is the diff that I needed to attempt building 7.0 diff --git a/Dockerfile.template b/Dockerfile.template
index 3b13775..43009e5 100644
--- a/Dockerfile.template
+++ b/Dockerfile.template
@@ -251,13 +251,26 @@ RUN set -eux; \
echo "$adapter:" >> ./config/database.yml; \
echo " adapter: $adapter" >> ./config/database.yml; \
done; \
-{{ if is_alpine then "" else ( -}}
+{{
+ # 6.0/alpine already sets this via ENV
+ if is_alpine and IN(env.version; "6.0") then "" else (
+-}}
+{{ def archVar: if is_alpine then "apkArch" else "dpkgArch" end -}}
+{{ if is_alpine then ( -}}
+# some ruby gems (like commonmarker) don't publish for musl except on amd64/arm64v8
+# force them to compile so that they don't pull the `arm-linux` version which doesn't work on musl
+{{ ) else ( -}}
# ruby gems (like nokogiri) don't publish arm32v5-compatible, pre-compiled libraries
# force them to compile so that they don't pull arm32v[6-7] libraries
- arch="$(dpkg --print-architecture)"; \
- if [ "$arch" = 'armel' ]; then \
- gosu redmine bundle config set force_ruby_platform true; \
- fi; \
+{{ ) end -}}
+ {{ archVar }}="$({{ if is_alpine then "apk --print-arch" else "dpkg --print-architecture" end }})"; \
+ case "${{ archVar }}" in \
+ {{ if is_alpine then "armhf|armv7" else "armel" end }}) \
+ gosu redmine bundle config set force_ruby_platform true; \
+ ;; \
+ esac; \
+{{ ) end -}}
+{{ if is_alpine then "" else ( -}}
# nokogiri's vendored libxml2 + libxslt do not build on mips64le, so use the apt packages when building
gosu redmine bundle config set build.nokogiri --use-system-libraries; \
{{ ) end -}}build error:error[E0063]: missing fields `_bitfield_1` and `_bitfield_align_1` in
initializer of `timespec`
-->
/home/redmine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/magnus-0.8.2/src/time.rs:141:9
|
141 | Self {
| ^^^^ missing `_bitfield_1` and `_bitfield_align_1`
error[E0063]: missing fields `_bitfield_1` and `_bitfield_align_1` in
initializer of `timespec`
-->
/home/redmine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/magnus-0.8.2/src/time.rs:288:28
|
288 | let mut timespec = timespec {
| ^^^^^^^^ missing `_bitfield_1` and
`_bitfield_align_1`
error[E0063]: missing fields `_bitfield_1` and `_bitfield_align_1` in
initializer of `timespec`
-->
/home/redmine/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/magnus-0.8.2/src/time.rs:397:28
|
397 | let mut timespec = timespec {
| ^^^^^^^^ missing `_bitfield_1` and
`_bitfield_align_1`
For more information about this error, try `rustc --explain E0063`.
error: could not compile `magnus` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:578: target/release/libcommonmarker.so] Error 101
make failed, exit code 2
Gem files will remain installed in /usr/local/bundle/gems/commonmarker-2.8.2 for
inspection.
Results logged to
/usr/local/bundle/extensions/x86-linux-musl/4.0.0/commonmarker-2.8.2/gem_make.out
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:139:in
'Gem::Ext::Builder.run'
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:65:in 'block in
Gem::Ext::Builder.make'
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:57:in 'Array#each'
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:57:in
'Gem::Ext::Builder.make'
/usr/local/lib/ruby/4.0.0/rubygems/ext/ext_conf_builder.rb:44:in
'Gem::Ext::ExtConfBuilder.build'
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:218:in
'Gem::Ext::Builder#build_extension'
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:250:in 'block in
Gem::Ext::Builder#build_extensions'
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:249:in 'Array#each'
/usr/local/lib/ruby/4.0.0/rubygems/ext/builder.rb:249:in
'Gem::Ext::Builder#build_extensions'
/usr/local/lib/ruby/4.0.0/rubygems/installer.rb:809:in
'Gem::Installer#build_extensions'
/usr/local/lib/ruby/4.0.0/bundler/rubygems_gem_installer.rb:112:in
'Bundler::RubyGemsGemInstaller#build_extensions'
/usr/local/lib/ruby/4.0.0/bundler/rubygems_gem_installer.rb:30:in
'Bundler::RubyGemsGemInstaller#install'
/usr/local/lib/ruby/4.0.0/bundler/source/rubygems.rb:211:in 'block in
Bundler::Source::Rubygems#install'
/usr/local/lib/ruby/4.0.0/rubygems.rb:1053:in 'Gem.time'
/usr/local/lib/ruby/4.0.0/bundler/source/rubygems.rb:210:in
'Bundler::Source::Rubygems#install'
/usr/local/lib/ruby/4.0.0/bundler/installer/gem_installer.rb:68:in
'Bundler::GemInstaller#install'
/usr/local/lib/ruby/4.0.0/bundler/installer/gem_installer.rb:17:in
'Bundler::GemInstaller#install_from_spec'
/usr/local/lib/ruby/4.0.0/bundler/installer/parallel_installer.rb:172:in
'Bundler::ParallelInstaller#do_install'
/usr/local/lib/ruby/4.0.0/bundler/installer/parallel_installer.rb:142:in
'block in Bundler::ParallelInstaller#worker_pool'
/usr/local/lib/ruby/4.0.0/bundler/worker.rb:70:in 'Bundler::Worker#apply_func'
/usr/local/lib/ruby/4.0.0/bundler/worker.rb:65:in 'block in
Bundler::Worker#process_queue'
/usr/local/lib/ruby/4.0.0/bundler/worker.rb:56:in 'Kernel#loop'
/usr/local/lib/ruby/4.0.0/bundler/worker.rb:56:in
'Bundler::Worker#process_queue'
/usr/local/lib/ruby/4.0.0/bundler/worker.rb:98:in 'block (2 levels) in
Bundler::Worker#create_threads'
An error occurred while installing commonmarker (2.8.2), and Bundler cannot
continue. |
| .matrix.include = [ | ||
| .matrix.include[] | ||
| | select( |
There was a problem hiding this comment.
Pre-existing so 🤷 but if you go in again
| .matrix.include = [ | |
| .matrix.include[] | |
| | select( | |
| .matrix.include |= map( | |
| select( |
| | select( | ||
| .name | ||
| | split("-") | ||
| | (.[0] | split(".")[0:2] | join(".") | tonumber) as $version |
There was a problem hiding this comment.
Also pre-existing, but this tonumber is probably fiddly
| if [[ "$variant" = 'alpine'* ]] then | ||
| variantArches="$(jq <<<"$variantArches" --raw-input --raw-output ' | ||
| split(" ") | ||
| | map(select(IN("i386", "arm32v7", "arm32v6") | not)) |
There was a problem hiding this comment.
| | map(select(IN("i386", "arm32v7", "arm32v6") | not)) | |
| - [ "i386", "arm32v7", "arm32v6" ] |
| print "so:" lib; \ | ||
| } \ | ||
| } \ | ||
| }' \ |
There was a problem hiding this comment.
This awk is definitely still heinous 😞
It's maybe not a problem by itself, but it's definitely a kind of "code smell" for an issue somewhere deeper in the stack 😭
| "pkgconf", | ||
| "xz-utils", | ||
| if IN(env.version; "6.0") then empty else | ||
| if IN(env.version; "6.0") or env.variant == "bookworm" then empty else |
There was a problem hiding this comment.
While this could be conceived as a breaking change for 6.1+ bookworm (by removing rust compiler), we don't have architectures that need to compile on bookworm. And if they did have to compile any dependencies via rust, it would fail with a "this version of Cargo is older than the 2024 edition, and only supports 2015, 2018, and 2021 editions" or possibly a "requires rustc 1.88.0".
| # Only resolve $ORIGIN. Modify rpath in place. | ||
| if (rpath ~ /^\$[{]?ORIGIN[}]?/) { \ | ||
| sub(/^\$[{]?ORIGIN[}]?/, origin, rpath); \ |
There was a problem hiding this comment.
| # Only resolve $ORIGIN. Modify rpath in place. | |
| if (rpath ~ /^\$[{]?ORIGIN[}]?/) { \ | |
| sub(/^\$[{]?ORIGIN[}]?/, origin, rpath); \ | |
| # Only resolve $ORIGIN-relative rpaths. | |
| if (sub(/^\$[{]?ORIGIN[}]?/, origin, rpath)) { \ |
Changes: - docker-library/redmine@f772dee: Add 7.0.0 (docker-library/redmine#424) Co-authored-by: Docker Library Bot <doi+docker-library-bot@docker.com>
|
Thanks all for your work. Upgraded right now, seems to work ;-) :-P |

Fixes #422
https://www.redmine.org/news/161