Skip to content

[build] Fix bookworm reproducible build issue.#18789

Merged
xumia merged 1 commit intosonic-net:masterfrom
liushilongbuaa:fix-bookworm
Apr 25, 2024
Merged

[build] Fix bookworm reproducible build issue.#18789
xumia merged 1 commit intosonic-net:masterfrom
liushilongbuaa:fix-bookworm

Conversation

@liushilongbuaa
Copy link
Contributor

@liushilongbuaa liushilongbuaa commented Apr 24, 2024

Why I did it

Bookworm involved new file /etc/apt/sources.list.d/debian.sources to setup debian mirror repo.
Reproducible build need to support this scenario.

Work item tracking
  • Microsoft ADO (number only): 27792318

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@liushilongbuaa liushilongbuaa marked this pull request as ready for review April 24, 2024 13:12
Copy link
Collaborator

@xumia xumia left a comment

Choose a reason for hiding this comment

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

LGTM

@liushilongbuaa
Copy link
Contributor Author

@xumia , kvmtest-t0 is a known issue. Please ignore.

@xumia xumia merged commit c3899ef into sonic-net:master Apr 25, 2024
@xumia
Copy link
Collaborator

xumia commented Apr 25, 2024

Bypass the known test case failure to fix build broken issue.

@k-v1
Copy link
Contributor

k-v1 commented May 19, 2024

@xumia @liushilongbuaa

I got this error message for sonic-slave-bookworm container:

BLDENV=bookworm make -f Makefile.work list
...
"PTF_ENV_PY_VER"                  : "mixed"

mv: cannot move '/etc/apt/sources.list.d/debian.sources' to '/etc/apt/sources.list.d/debian.sources.back': Permission denied
"SONIC_DPKG_CACHE_METHOD"         : "cache"

Maybe you should use $SUDO here?

@liushilongbuaa
Copy link
Contributor Author

@xumia @liushilongbuaa

I got this error message for sonic-slave-bookworm container:

BLDENV=bookworm make -f Makefile.work list
...
"PTF_ENV_PY_VER"                  : "mixed"

mv: cannot move '/etc/apt/sources.list.d/debian.sources' to '/etc/apt/sources.list.d/debian.sources.back': Permission denied
"SONIC_DPKG_CACHE_METHOD"         : "cache"

Maybe you should use $SUDO here?

Oh.

@xumia @liushilongbuaa

I got this error message for sonic-slave-bookworm container:

BLDENV=bookworm make -f Makefile.work list
...
"PTF_ENV_PY_VER"                  : "mixed"

mv: cannot move '/etc/apt/sources.list.d/debian.sources' to '/etc/apt/sources.list.d/debian.sources.back': Permission denied
"SONIC_DPKG_CACHE_METHOD"         : "cache"

Maybe you should use $SUDO here?

It needs tests. Maybe some scenario reports the error. The PR fixed build issue at that time. I'm not sure if adding sudo have other issues.

@k-v1
Copy link
Contributor

k-v1 commented May 21, 2024

It needs tests. Maybe some scenario reports the error. The PR fixed build issue at that time. I'm not sure if adding sudo have other issues.

@liushilongbuaa FYI

When we enable or disable reproducible mirrors in this function we use $SUDO:

        # Enable or disable the reproducible mirrors
        $SUDO sed -i "$expression" "$mirror"

        # Enable or disable the none reproducible mirrors
        if [ "$MIRROR_SNAPSHOT" == y ]; then
            $SUDO sed -ri "$expression2" "$mirror"
        fi

        # Add or remove the SET_REPR_MIRRORS flag
        $SUDO sed -i "$expression3" "$mirror"

That's why my suggestion was to also use $SUDO when mv sources.list. But I haven't tested this.

matofeder added a commit to matofeder/sonic-buildimage that referenced this pull request Oct 9, 2024
This commit resolves a permission denied issue during the mv command in bookworm
by adding escalated sudo privileges. For more details, see the related PR
and discussion:
sonic-net#18789

Signed-off-by: Matej Feder <[email protected]>
matofeder added a commit to SovereignCloudStack/sonic-buildimage that referenced this pull request Oct 9, 2024
This commit resolves a permission denied issue during the mv command in bookworm
by adding escalated sudo privileges. For more details, see the related PR
and discussion:
sonic-net/sonic-buildimage#18789

Signed-off-by: Matej Feder <[email protected]>
nate-nexthop pushed a commit to nexthop-ai/sonic-buildimage that referenced this pull request Dec 11, 2025
This commit resolves a permission denied issue during the mv command in bookworm
by adding escalated sudo privileges. For more details, see the related PR
and discussion:
sonic-net#18789

Signed-off-by: Matej Feder <[email protected]>
yejianquan pushed a commit that referenced this pull request Jan 8, 2026
This commit resolves a permission denied issue during the mv command in bookworm
by adding escalated sudo privileges. For more details, see the related PR
and discussion:
#18789

Why I did it
make configure for broadcom reports Permission denied issue

make configure PLATFORM=broadcom 
....
"LEGACY_SONIC_MGMT_DOCKER"        : "y"
"INCLUDE_EXTERNAL_PATCHES"        : "n"
"PTF_ENV_PY_VER"                  : "mixed"

mv: cannot move '/etc/apt/sources.list.d/debian.sources' to '/etc/apt/sources.list.d/debian.sources.back': Permission denied
"SONIC_DPKG_CACHE_METHOD"         : "none"

make[1]: Leaving directory '/home/ubuntu/sonic-buildimage'
How I did it
I resolved it by adding escalated sudo privileges.

For more details, see the related PR and discussion:
#18789

How to verify it
make configure PLATFORM=broadcom should pass without permission issues

Signed-off-by: Matej Feder <[email protected]>
jasonbridges pushed a commit to jasonbridges/sonic-buildimage that referenced this pull request Jan 22, 2026
This commit resolves a permission denied issue during the mv command in bookworm
by adding escalated sudo privileges. For more details, see the related PR
and discussion:
sonic-net#18789

Why I did it
make configure for broadcom reports Permission denied issue

make configure PLATFORM=broadcom 
....
"LEGACY_SONIC_MGMT_DOCKER"        : "y"
"INCLUDE_EXTERNAL_PATCHES"        : "n"
"PTF_ENV_PY_VER"                  : "mixed"

mv: cannot move '/etc/apt/sources.list.d/debian.sources' to '/etc/apt/sources.list.d/debian.sources.back': Permission denied
"SONIC_DPKG_CACHE_METHOD"         : "none"

make[1]: Leaving directory '/home/ubuntu/sonic-buildimage'
How I did it
I resolved it by adding escalated sudo privileges.

For more details, see the related PR and discussion:
sonic-net#18789

How to verify it
make configure PLATFORM=broadcom should pass without permission issues

Signed-off-by: Matej Feder <[email protected]>
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
This commit resolves a permission denied issue during the mv command in bookworm
by adding escalated sudo privileges. For more details, see the related PR
and discussion:
sonic-net#18789

Why I did it
make configure for broadcom reports Permission denied issue

make configure PLATFORM=broadcom
....
"LEGACY_SONIC_MGMT_DOCKER"        : "y"
"INCLUDE_EXTERNAL_PATCHES"        : "n"
"PTF_ENV_PY_VER"                  : "mixed"

mv: cannot move '/etc/apt/sources.list.d/debian.sources' to '/etc/apt/sources.list.d/debian.sources.back': Permission denied
"SONIC_DPKG_CACHE_METHOD"         : "none"

make[1]: Leaving directory '/home/ubuntu/sonic-buildimage'
How I did it
I resolved it by adding escalated sudo privileges.

For more details, see the related PR and discussion:
sonic-net#18789

How to verify it
make configure PLATFORM=broadcom should pass without permission issues

Signed-off-by: Matej Feder <[email protected]>
Signed-off-by: Feng Pan <[email protected]>
dprital pushed a commit that referenced this pull request Mar 19, 2026
This commit resolves a permission denied issue during the mv command in bookworm
by adding escalated sudo privileges. For more details, see the related PR
and discussion:
#18789

Why I did it
make configure for broadcom reports Permission denied issue

make configure PLATFORM=broadcom
....
"LEGACY_SONIC_MGMT_DOCKER"        : "y"
"INCLUDE_EXTERNAL_PATCHES"        : "n"
"PTF_ENV_PY_VER"                  : "mixed"

mv: cannot move '/etc/apt/sources.list.d/debian.sources' to '/etc/apt/sources.list.d/debian.sources.back': Permission denied
"SONIC_DPKG_CACHE_METHOD"         : "none"

make[1]: Leaving directory '/home/ubuntu/sonic-buildimage'
How I did it
I resolved it by adding escalated sudo privileges.

For more details, see the related PR and discussion:
#18789

How to verify it
make configure PLATFORM=broadcom should pass without permission issues

Signed-off-by: Matej Feder <[email protected]>
Signed-off-by: dprital <[email protected]>
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 this pull request may close these issues.

3 participants