Skip to content

Commit

Permalink
[frr]: Use tag for building frr (#4082)
Browse files Browse the repository at this point in the history
Changed logic for building frr. Previously we used latest commit in the FRR_BRANCH. Now the buildsystem will use a tag to identify a commit for building. New approach will let us to update sonic-frr without corrupting building sonic-buildimage.
  • Loading branch information
pavel-shirshov authored Feb 7, 2020
1 parent 57d4c84 commit c63b5fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions rules/frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
FRR_VERSION = 7.2.1
FRR_SUBVERSION = 0
FRR_BRANCH = frr/7.2
FRR_TAG = frr-7.2.1-s1
export FRR_VERSION FRR_SUBVERSION FRR_BRANCH


Expand Down
2 changes: 1 addition & 1 deletion src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Build the package
pushd ./frr
git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH)
stg branch --create $(STG_BRANCH) $(FRR_BRANCH)
stg branch --create $(STG_BRANCH) $(FRR_TAG)
stg import -s ../patch/series
tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
Expand Down

2 comments on commit c63b5fc

@zhanggongc
Copy link

Choose a reason for hiding this comment

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

Compiling problem:
I have modify the file frr/debain/rules, but compiling can't pass successfully
error report :
image

modify rules like this:
image

@zhanggongc
Copy link

Choose a reason for hiding this comment

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

[ FAIL LOG START ] [ target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb ]
make[1]: Entering directory '/sonic/src/sonic-frr'

Build the package

pushd ./frr
git checkout -b frr/7.2 origin/frr/7.2
stg branch --create stg_temp.20200630.004731 frr-7.2.1-s3
stg import -s ../patch/series
tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j8
stg undo || true
git clean -xfdf
git checkout frr/7.2
stg branch --delete stg_temp.20200630.004731
git rev-parse --short HEAD | xargs git checkout
git checkout master
git branch -D frr/7.2
popd
mv frr-pythontools_7.2.1-sonic-0_all.deb frr-dbgsym_7.2.1-sonic-0_amd64.deb frr-snmp_7.2.1-sonic-0_amd64.deb frr-snmp-dbgsym_7.2.1-sonic-0_amd64.deb frr_7.2.1-sonic-0_amd64.deb /sonic/target/debs/stretch/
/sonic/src/sonic-frr/frr /sonic/src/sonic-frr
Switched to a new branch 'frr/7.2'
D debian/changelog
M debian/rules
Branch frr/7.2 set up to track remote branch frr/7.2 from origin.
stg branch: local changes in the tree. Use "refresh" or "reset --hard"
Makefile:11: recipe for target '/sonic/target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb' failed
make[1]: *** [/sonic/target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb] Error 2
make[1]: Leaving directory '/sonic/src/sonic-frr'
[ FAIL LOG END ] [ target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb ]
slave.mk:327: recipe for target 'target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb' failed
make: *** [target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb] Error 1
Makefile.work:198: recipe for target 'target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb' failed
make[1]: *** [target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb] Error 2
make[1]: Leaving directory '/mnt/data/gdnosv2-sonic-buildimage'
Makefile:6: recipe for target 'target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb' failed
make: *** [target/debs/stretch/frr_7.2.1-sonic-0_amd64.deb] Error 2

Please sign in to comment.