Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bob-core Dockerfile template clobbered RUN command #231

Closed
berney opened this issue Apr 30, 2023 · 0 comments · Fixed by #232
Closed

bob-core Dockerfile template clobbered RUN command #231

berney opened this issue Apr 30, 2023 · 0 comments · Fixed by #232

Comments

@berney
Copy link
Contributor

berney commented Apr 30, 2023

The bob-core Dockerfile template has a run step that creates/appends/edits files in /etc/portage/.
But then a later step does COPY etc/ /etc/ which will clobber nearly all of what the RUN step did.
If I understand correctly the only thing from the RUN that will have any effect is the mkdir -p /etc/portage/profifile.

Also l think the BOB_SYNC_URI and BOB_SYNC_TYPE disappeared in 6edaa79.

This is the relevant snippet of the Dockerfile template.

RUN set -x && \
    echo 'GENTOO_MIRRORS="http://distfiles.gentoo.org/"' >> /etc/portage/make.conf && \
    mkdir -p /etc/portage/repos.conf && \
    sed -e 's|^sync-uri =.*|sync-uri = ${BOB_SYNC_URI}|' \
        -e 's|^sync-type =.*|sync-type = ${BOB_SYNC_TYPE}|' \
        /usr/share/portage/config/repos.conf > /etc/portage/repos.conf/gentoo.conf && \
    mkdir -p /etc/portage/profile

# DEF_BUILDER_* is only active in configure_bob() hook, generally only differs when using crossdev
ENV DEF_CHOST="${BOB_CHOST}" \
    DEF_CFLAGS="${BOB_CFLAGS}" \
    DEF_CXXFLAGS="${BOB_CXXFLAGS}" \
    DEF_BUILDER_CHOST="${BOB_BUILDER_CHOST}" \
    DEF_BUILDER_CFLAGS="${BOB_BUILDER_CFLAGS}" \
    DEF_BUILDER_CXXFLAGS="${BOB_BUILDER_CXXFLAGS}" \
    PKGDIR="/packages/${BOB_CHOST}"

COPY etc/ /etc/

In gentoo stage3 tarballs (and docker images) /etc/portage/profile/ dir exists. So I think the RUN step can be dropped.

berney added a commit to berney/kubler that referenced this issue Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant