Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions containers/cinder/cinder-api/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ COPY ${CONSTRAINTS_FILE} /deps-upper-constraints.txt
COPY src/ /src/
COPY cinder-api/src/ /src/

# Drop excluded upstream requirements before building the service wheel, so the
# wheel's own metadata (Requires-Dist) cannot pull them back in at install time.
# Mirrors the RDO cinder distgit spec, which strips the same packages from
# requirements.txt in %prep. See docs/excluding-requirements.md.
COPY excluded-requirements.txt /tmp/excluded-requirements.txt
# Pre-strip comments, inline whitespace, and blank lines inline so the loop sees
# one bare package name per line -- identical to the host-side strip in build.sh.
RUN sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' /tmp/excluded-requirements.txt | \
while IFS= read -r pkg; do \
for req in /src/*/requirements.txt /src/overrides/*/requirements.txt; do \
if [ -f "${req}" ]; then \
sed -i -E "/^${pkg}([[:space:]<>=!~;,#[]|\$)/Id" "${req}"; \
fi; \
done; \
done && \
rm /tmp/excluded-requirements.txt

# We can force build from source of all packages optionally
ARG PIP_NO_BINARY=""
ENV PIP_NO_BINARY=${PIP_NO_BINARY}
Expand Down
17 changes: 17 additions & 0 deletions containers/cinder/cinder-backup/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ COPY ${CONSTRAINTS_FILE} /deps-upper-constraints.txt
COPY src/ /src/
COPY cinder-backup/src/ /src/

# Drop excluded upstream requirements before building the service wheel, so the
# wheel's own metadata (Requires-Dist) cannot pull them back in at install time.
# Mirrors the RDO cinder distgit spec, which strips the same packages from
# requirements.txt in %prep. See docs/excluding-requirements.md.
COPY excluded-requirements.txt /tmp/excluded-requirements.txt
# Pre-strip comments, inline whitespace, and blank lines inline so the loop sees
# one bare package name per line -- identical to the host-side strip in build.sh.
RUN sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' /tmp/excluded-requirements.txt | \
while IFS= read -r pkg; do \
for req in /src/*/requirements.txt /src/overrides/*/requirements.txt; do \
if [ -f "${req}" ]; then \
sed -i -E "/^${pkg}([[:space:]<>=!~;,#[]|\$)/Id" "${req}"; \
fi; \
done; \
done && \
rm /tmp/excluded-requirements.txt

# We can force build from source of all packages optionally
ARG PIP_NO_BINARY=""
ENV PIP_NO_BINARY=${PIP_NO_BINARY}
Expand Down
17 changes: 17 additions & 0 deletions containers/cinder/cinder-scheduler/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ COPY ${CONSTRAINTS_FILE} /deps-upper-constraints.txt
COPY src/ /src/
COPY cinder-scheduler/src/ /src/

# Drop excluded upstream requirements before building the service wheel, so the
# wheel's own metadata (Requires-Dist) cannot pull them back in at install time.
# Mirrors the RDO cinder distgit spec, which strips the same packages from
# requirements.txt in %prep. See docs/excluding-requirements.md.
COPY excluded-requirements.txt /tmp/excluded-requirements.txt
# Pre-strip comments, inline whitespace, and blank lines inline so the loop sees
# one bare package name per line -- identical to the host-side strip in build.sh.
RUN sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' /tmp/excluded-requirements.txt | \
while IFS= read -r pkg; do \
for req in /src/*/requirements.txt /src/overrides/*/requirements.txt; do \
if [ -f "${req}" ]; then \
sed -i -E "/^${pkg}([[:space:]<>=!~;,#[]|\$)/Id" "${req}"; \
fi; \
done; \
done && \
rm /tmp/excluded-requirements.txt

# We can force build from source of all packages optionally
ARG PIP_NO_BINARY=""
ENV PIP_NO_BINARY=${PIP_NO_BINARY}
Expand Down
17 changes: 17 additions & 0 deletions containers/cinder/cinder-volume/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ COPY ${CONSTRAINTS_FILE} /deps-upper-constraints.txt
COPY src/ /src/
COPY cinder-volume/src/ /src/

# Drop excluded upstream requirements before building the service wheel, so the
# wheel's own metadata (Requires-Dist) cannot pull them back in at install time.
# Mirrors the RDO cinder distgit spec, which strips the same packages from
# requirements.txt in %prep. See docs/excluding-requirements.md.
COPY excluded-requirements.txt /tmp/excluded-requirements.txt
# Pre-strip comments, inline whitespace, and blank lines inline so the loop sees
# one bare package name per line -- identical to the host-side strip in build.sh.
RUN sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' /tmp/excluded-requirements.txt | \
while IFS= read -r pkg; do \
for req in /src/*/requirements.txt /src/overrides/*/requirements.txt; do \
if [ -f "${req}" ]; then \
sed -i -E "/^${pkg}([[:space:]<>=!~;,#[]|\$)/Id" "${req}"; \
fi; \
done; \
done && \
rm /tmp/excluded-requirements.txt

# We can force build from source of all packages optionally
ARG PIP_NO_BINARY=""
ENV PIP_NO_BINARY=${PIP_NO_BINARY}
Expand Down
4 changes: 4 additions & 0 deletions containers/cinder/excluded-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# zoneinfo library is provided in python3-libs which uses system installed tzdata.
# The distgit drops this from requirements.txt too.
# Source: https://raw.githubusercontent.com/rdo-packages/cinder-distgit/rpm-master/openstack-cinder.spec (line 5)
tzdata

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we installed this in the base contianer https://github.com/openstack-k8s-operators/tcib/blob/371f1136bba1b2821d105e73aa361de0faf7fd4a/container-images/tcib/base/base.yaml#L38

the tz to UTC to deal with a rhel regression in the past

openstack-k8s-operators/tcib@667788f

i guess we are exluding this from requirements.txt becuase we want to use the version form the disto instead.

this is required for logging and time stames to be correct sicne its used as part of the lcoale settings and python build in datatime modules

we do the same config here
https://github.com/openstack-k8s-operators/s2i-openstack-containers/blob/main/containers/base/Containerfile#L22-L23 and i belive we inherit the package form the base rhel ubi-minimal image

so i think this makes sense to exclude.