diff --git a/CHANGELOG.md b/CHANGELOG.md index ac6db64ab6..0bb85cece0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,16 @@ ## [Unreleased] # Add - Add `imgproxy.source_image_url` and `imgproxy.processing_options` attributes to New Relic, DataDog, and OpenTelemetry traces. +- Add [IMGPROXY_S3_ENDPOINT_USE_PATH_STYLE](https://docs.imgproxy.net/latest/configuration/options#IMGPROXY_S3_ENDPOINT_USE_PATH_STYLE) config. - (pro) Add [monochrome](https://docs.imgproxy.net/latest/usage/processing#monochrome) processing option. - (pro) Add [duotone](https://docs.imgproxy.net/latest/usage/processing#duotone) processing option. +- (pro) Add `objw` [gravity](https://docs.imgproxy.net/latest/usage/processing#gravity) type. +- (pro) Add an object pseudo-class `all` that can be used with the `obj` and `objw` [gravity](https://docs.imgproxy.net/latest/usage/processing#gravity) types to match all detected objects. +- (docker) Add a script for [building Linux packages](https://docs.imgproxy.net/latest/installation#building-linux-packages). # Change - Properly set the `net.host.name` and `http.url` tags in OpenTelemetry traces. +- (pro) Object detection: [class names file](https://docs.imgproxy.net/latest/object_detection#class-names-file) can contain object classes' weights. # Fix - Fix handling `#` symbols in `local://`, `s3://`, `gcs://`, `abs://`, and `swift://` URLs. diff --git a/config/config.go b/config/config.go index c1dcf39a93..1103de1b1c 100644 --- a/config/config.go +++ b/config/config.go @@ -107,6 +107,7 @@ var ( S3Enabled bool S3Region string S3Endpoint string + S3EndpointUsePathStyle bool S3AssumeRoleArn string S3AssumeRoleExternalID string S3MultiRegion bool @@ -308,6 +309,7 @@ func Reset() { S3Enabled = false S3Region = "" S3Endpoint = "" + S3EndpointUsePathStyle = true S3AssumeRoleArn = "" S3AssumeRoleExternalID = "" S3MultiRegion = false @@ -539,6 +541,7 @@ func Configure() error { configurators.Bool(&S3Enabled, "IMGPROXY_USE_S3") configurators.String(&S3Region, "IMGPROXY_S3_REGION") configurators.String(&S3Endpoint, "IMGPROXY_S3_ENDPOINT") + configurators.Bool(&S3EndpointUsePathStyle, "IMGPROXY_S3_ENDPOINT_USE_PATH_STYLE") configurators.String(&S3AssumeRoleArn, "IMGPROXY_S3_ASSUME_ROLE_ARN") configurators.String(&S3AssumeRoleExternalID, "IMGPROXY_S3_ASSUME_ROLE_EXTERNAL_ID") configurators.Bool(&S3MultiRegion, "IMGPROXY_S3_MULTI_REGION") diff --git a/docker/imgproxy-build-package b/docker/imgproxy-build-package index a86b694a33..afb0b7a6fd 100755 --- a/docker/imgproxy-build-package +++ b/docker/imgproxy-build-package @@ -183,11 +183,12 @@ echo echo "Packaging..." VERSION=$(imgproxy version) +RELEASE=$(printf '%(%y%m%d%H%M)T\n' -1) case $PACKAGE_TYPE in # TAR package ---------------------------------------------------------------- tar) - RESULT_FILE=imgproxy-$VERSION.$(dpkg --print-architecture).tar.gz + RESULT_FILE=imgproxy-$VERSION-$RELEASE.$(dpkg --print-architecture).tar.gz tar -czf $RESULT_FILE -C opt imgproxy cp $RESULT_FILE $TARGET_DIR @@ -196,7 +197,7 @@ case $PACKAGE_TYPE in # DEB package ---------------------------------------------------------------- deb) DEB_ARCH=$(dpkg --print-architecture) - RESULT_FILE=imgproxy-$VERSION.$DEB_ARCH.deb + RESULT_FILE=imgproxy-$VERSION-$RELEASE.$DEB_ARCH.deb mkdir -p imgproxy mv opt imgproxy/ @@ -208,11 +209,11 @@ case $PACKAGE_TYPE in cat << EOF > imgproxy/DEBIAN/control Package: imgproxy -Version: $VERSION +Version: $VERSION-$RELEASE Section: base Priority: optional Architecture: $DEB_ARCH -Depends: bash, libc6, libstdc++6, fontconfig-config, ca-certificates +Depends: bash, libc6, libstdc++6, fontconfig-config, ca-certificates, media-types Maintainer: Foxes With Matches Homepage: https://imgproxy.net Description: imgproxy @@ -261,7 +262,7 @@ EOF DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends rpm RPM_ARCH=$(rpm --eval '%{_arch}') - RESULT_FILE=imgproxy-$VERSION-1.$RPM_ARCH.rpm + RESULT_FILE=imgproxy-$VERSION-$RELEASE.$RPM_ARCH.rpm mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} mkdir -p rpmbuild/SOURCES/imgproxy @@ -273,7 +274,7 @@ EOF cat << 'EOF' > rpmbuild/SPECS/imgproxy.spec Name: imgproxy Version: %{version} -Release: 1 +Release: %{release} Summary: imgproxy License: MIT URL: https://imgproxy.net @@ -285,6 +286,7 @@ Requires: glibc Requires: libstdc++ Requires: fontconfig Requires: ca-certificates +Requires: shared-mime-info Requires(interp): /bin/bash Requires(post): /bin/bash Requires(preun): /bin/bash @@ -326,6 +328,7 @@ EOF rpmbuild \ --define "_topdir $(pwd)/rpmbuild" \ --define "version $VERSION" \ + --define "release $RELEASE" \ -bb rpmbuild/SPECS/imgproxy.spec cp rpmbuild/RPMS/$RPM_ARCH/$RESULT_FILE $TARGET_DIR diff --git a/transport/s3/s3.go b/transport/s3/s3.go index eecd7dd7e3..757a162b98 100644 --- a/transport/s3/s3.go +++ b/transport/s3/s3.go @@ -84,7 +84,7 @@ func New() (http.RoundTripper, error) { } clientOptions = append(clientOptions, func(o *s3.Options) { o.BaseEndpoint = aws.String(endpoint) - o.UsePathStyle = true + o.UsePathStyle = config.S3EndpointUsePathStyle }) }