Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package obs-service-docker_label_helper for openSUSE:Factory checked in at 2023-03-01 16:14:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/obs-service-docker_label_helper (Old) and /work/SRC/openSUSE:Factory/.obs-service-docker_label_helper.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-docker_label_helper" Wed Mar 1 16:14:31 2023 rev:6 rq:1068356 version:0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/obs-service-docker_label_helper/obs-service-docker_label_helper.changes 2022-12-08 16:52:42.619951842 +0100 +++ /work/SRC/openSUSE:Factory/.obs-service-docker_label_helper.new.31432/obs-service-docker_label_helper.changes 2023-03-01 16:14:59.782892795 +0100 @@ -1,0 +2,6 @@ +Wed Mar 1 07:54:19 UTC 2023 - Fabian Vogt <fv...@suse.com> + +- Handle LABEL statements with any whitespace +- Handle LABEL values containing "=" properly + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ obs-service-docker_label_helper.spec ++++++ --- /var/tmp/diff_new_pack.F1KhWh/_old 2023-03-01 16:15:00.342895691 +0100 +++ /var/tmp/diff_new_pack.F1KhWh/_new 2023-03-01 16:15:00.350895732 +0100 @@ -1,7 +1,7 @@ # # spec file for package obs-service-docker_label_helper # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++++++ docker_label_helper ++++++ --- /var/tmp/diff_new_pack.F1KhWh/_old 2023-03-01 16:15:00.398895980 +0100 +++ /var/tmp/diff_new_pack.F1KhWh/_new 2023-03-01 16:15:00.398895980 +0100 @@ -22,7 +22,7 @@ # Note: Avoid assigning to $1 etc. as that converts whitespace (field separators) to single spaces. gawk -i inplace ' match($0, /^# labelprefix=(.*)$/, m) { labelprefix=m[1]; next } - labelprefix != "" && match($0, /^(PREFIXED)?LABEL .*\.([^.]*)=(.*)$/, m) { printf "LABEL %s.%s=%s\n", labelprefix, m[2], m[3]; gsub(/^PREFIXEDLABEL/, "LABEL") } + labelprefix != "" && match($0, /^(PREFIXED)?LABEL[[:space:]]+[^=]*\.([^.=]*)=(.*)$/, m) { printf "LABEL %s.%s=%s\n", labelprefix, m[2], m[3]; gsub(/^PREFIXEDLABEL/, "LABEL") } match($0, /^# endlabelprefix/) { labelprefix=""; next } 1' Dockerfile ++++++ test.sh ++++++ --- /var/tmp/diff_new_pack.F1KhWh/_old 2023-03-01 16:15:00.434896167 +0100 +++ /var/tmp/diff_new_pack.F1KhWh/_new 2023-03-01 16:15:00.438896187 +0100 @@ -12,7 +12,8 @@ # labelprefix=org.opensuse.nano PREFIXEDLABEL org.opencontainers.image.title="Example container." PREFIXEDLABEL org.opencontainers.image.description="This contains nano" -PREFIXEDLABEL test.whitespace="Two spaces. One tab." +PREFIXEDLABEL org.opencontainers.image.source="https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=1afbea7e9b8ecf976071564312c2db66" +PREFIXEDLABEL test.whitespace="Two spaces. One tab." EOF export BUILD_DIST= @@ -23,8 +24,10 @@ LABEL org.opencontainers.image.title="Example container." LABEL org.opensuse.nano.description="This contains nano" LABEL org.opencontainers.image.description="This contains nano" +LABEL org.opensuse.nano.source="https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=1afbea7e9b8ecf976071564312c2db66" +LABEL org.opencontainers.image.source="https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=1afbea7e9b8ecf976071564312c2db66" LABEL org.opensuse.nano.whitespace="Two spaces. One tab." -LABEL test.whitespace="Two spaces. One tab." +LABEL test.whitespace="Two spaces. One tab." EOF rm -f Dockerfile @@ -34,7 +37,8 @@ # labelprefix=org.opensuse.nano LABEL org.opencontainers.image.title="Example container." LABEL org.opencontainers.image.description="This contains nano" -LABEL test.whitespace="Two spaces. One tab." +LABEL org.opencontainers.image.source="https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=1afbea7e9b8ecf976071564312c2db66" +LABEL test.whitespace="Two spaces. One tab." # endlabelprefix LABEL not.expanded.label="example" EOF @@ -47,8 +51,10 @@ LABEL org.opencontainers.image.title="Example container." LABEL org.opensuse.nano.description="This contains nano" LABEL org.opencontainers.image.description="This contains nano" +LABEL org.opensuse.nano.source="https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=1afbea7e9b8ecf976071564312c2db66" +LABEL org.opencontainers.image.source="https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=1afbea7e9b8ecf976071564312c2db66" LABEL org.opensuse.nano.whitespace="Two spaces. One tab." -LABEL test.whitespace="Two spaces. One tab." +LABEL test.whitespace="Two spaces. One tab." LABEL not.expanded.label="example" EOF