Fix sonic frr makefile to handle multiple builds#3483
Fix sonic frr makefile to handle multiple builds#3483nikos-github wants to merge 8 commits intosonic-net:masterfrom
Conversation
Sync to master
Sync to master
|
Hi Nikos, Thank you for the patch. Can we make a loop over an array? done |
|
+Dilip
…On Tue, Sep 24, 2019 at 2:22 PM pavel-shirshov ***@***.***> wrote:
Hi Nikos,
Thank you for the patch. Can we make a loop over an array?
for patch_file in patch_file1 patch_file2 patch_file3
do
done
Also we could make a list of patches from ls of the patches directory.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3483>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPRCWZVHFMX2ZMY3KXIQPDQLJLIFANCNFSM4IYG3LDQ>
.
|
|
#3480 is a much simpler way to fix this issue. but I do not know why stg init fails? |
Will do.
I'm really not keen on parsing screen output in the makefile. How strongly do you feel about this? |
src/sonic-frr/Makefile
Outdated
There was a problem hiding this comment.
Hi,
what does "if patch -sfp1 --dry-run < ../patch/$(patch5);" mean ? Also, I am adding a new patch6. For every new patch, should we change the sonic-frr/makefile.
There was a problem hiding this comment.
Yes, with each patch the makefile would have to be changed. if patch -sfp1 --dry-run < ../patch/$(patch5) tries (without applying hence the dry-run) to see if the patch can apply.
|
retest this please |
1 similar comment
|
retest this please |
src/sonic-frr/Makefile
Outdated
There was a problem hiding this comment.
Hi Nikos,
I needed this patch for my broadcom image. I had taken your changes and made some additions since I needed it urgently for submitting my changes. The below script works for broadcom image.
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
MAIN_TARGET = $(FRR)
DERIVED_TARGET =
patch1 = 0001-Add-support-of-bgp-tcp-DSCP-value.patch
patch2 = 0002-Reduce-severity-of-Vty-connected-from-message.patch
patch3 = 0003-ignore-nexthop-attribute-when-NLRI-is-present.patch
patch4 = 0004-Allow-BGP-attr-NEXT_HOP-to-be-0.0.0.0-due-to-allevia.patch
patch5 = 0005-Support-VRF.patch
# Build the package
pushd ./frr
for frr_patch in
echo "Patch $$frr_patch"
if patch -sfp1 --dry-run < ../patch/$$frr_patch; then
patch -sfp1 < ../patch/$$frr_patch
else
if ! patch -Rsfp1 --dry-run < ../patch/$$frr_patch; then
echo "Patch $$frr_patch failure"
exit 1
fi
fi
done
tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
popd
mv
There was a problem hiding this comment.
Yes my latest patch is somewhat similar.
There was a problem hiding this comment.
You need to replace
There was a problem hiding this comment.
Thank you for the correction.
f5d83f1 to
e20c213
Compare
|
@lguohan Can we merge this? |
|
@nikos-github Currently I'm working on #3480 |
@pavel-shirshov Is your solution considering private changes? Can you explain how it will work if someone has modified frr code and wants to re-build? The solution in this PR will work with private changes too if any of the patches are not affected. |
|
Close in favor of #3480 |
…atically (#20122) #### Why I did it src/sonic-utilities ``` * d29b824 - (HEAD -> master, origin/master, origin/HEAD) Revert "[wol] Implement wol command line utility" (#3515) (3 hours ago) [Wenda Chu] * 9357c45 - [chassis][cli] Fix config chassis module startup/shutdown command for fabric module (#3483) (9 hours ago) [Marty Y. Lok] * 4c7e54a - [qos reload] Fix "config qos reload" overriding entire CONFIG_DB (#3479) (18 hours ago) [Stepan Blyshchak] * 544584e - Add back the option f to the reboot script (#3492) (18 hours ago) [DavidZagury] * dc955e8 - [Mellanox] Add CMIS Host Management Files to 'show techsupport' Dumps (#3501) (18 hours ago) [Tomer Shalvi] ``` #### How I did it #### How to verify it #### Description for the changelog
…atically (#20188) #### Why I did it src/sonic-utilities ``` * 3a0575c2 - (HEAD -> 202405, origin/202405) Add back the option f to the reboot script (#3492) (4 hours ago) [DavidZagury] * 60c14df8 - Enable show interfacess counters on chassis supervisor (#3488) (4 hours ago) [Changrong Wu] * cbbfe7b7 - [chassis][cli] Fix config chassis module startup/shutdown command for fabric module (#3483) (4 hours ago) [Marty Y. Lok] * b6cbe6ed - Remove redundant mmuconfig file (#3446) (4 hours ago) [HP] * fb6dd589 - [qos reload] Fix "config qos reload" overriding entire CONFIG_DB (#3479) (4 hours ago) [Stepan Blyshchak] * 9da5db58 - Skip default lanes dup check (#3489) (4 hours ago) [Xincun Li] * edde02ce - [Mellanox] Add CMIS Host Management Files to 'show techsupport' Dumps (#3501) (4 hours ago) [Tomer Shalvi] ``` #### How I did it #### How to verify it #### Description for the changelog
This fixes #3407.
The logic is to try a dry run on the patch and if that passes, apply the patch. If not, try a dry run removal. If it passes, the patch is already applied and the code hasn't changed significantly to affect it. If it doesn't pass, fail the build as the patch most probably needs to be reworked.
@lguohan @pavel-shirshov Please review.
FYI: @ben-gale @MichelMoriniaux @mslocrian @heidinet2007