-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
libteam: Adding build.sh script #18
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM docker-base | ||
|
||
COPY ["deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "libnl-route-3-200_*.deb", "deps/libnl-cli-3-200_*.deb", "deps/libteam5_*.deb", "deps/libteam-dev_*.deb", "deps/libteam-utils_*.deb", "deps/libteamdctl0_*.deb", "deps/libhiredis0.13_*.deb", "deps/libswsscommon_*.deb", "/deps/"] | ||
|
||
|
||
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \ | ||
dpkg_apt /deps/libnl-3-200_*.deb \ | ||
&& dpkg_apt /deps/libnl-genl-3-200_*.deb \ | ||
&& dpkg_apt /deps/libnl-route-3-200_*.deb \ | ||
&& dpkg_apt /deps/libnl-cli-3-200_*.deb \ | ||
&& dpkg_apt /deps/libteam5_*.deb \ | ||
&& dpkg_apt /deps/libteam-dev_*.deb \ | ||
&& dpkg_apt /deps/libteam-utils_*.deb \ | ||
&& dpkg_apt /deps/libteamdctl0_*.deb \ | ||
&& dpkg_apt /deps/libhiredis0.13_*.deb \ | ||
&& dpkg_apt /deps/libswsscommon_*.deb | ||
|
||
COPY ["deps/teamsyncd", "start.sh", "/usr/bin/"] | ||
|
||
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y | ||
RUN rm -rf /deps | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD ["/usr/bin/start.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
TEAMD_CONF_PATH=/etc/teamd | ||
|
||
function clean_up { | ||
pkill -9 teamd | ||
pkill -9 teamsyncd | ||
service rsyslog stop | ||
exit | ||
} | ||
|
||
trap clean_up SIGTERM SIGKILL | ||
|
||
service rsyslog start | ||
|
||
if [ -d $TEAMD_CONF_PATH ]; then | ||
for f in $TEAMD_CONF_PATH/*; do | ||
teamd -f $f -d | ||
done | ||
fi | ||
|
||
teamsyncd & | ||
|
||
read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,9 @@ install_deb = \ | |
libnl-%.deb: | ||
pushd libnl3; ./build.sh; popd | ||
|
||
libteam5_1.26-1_amd64.deb libteam-dev_1.26-1_amd64.deb libteam-utils_1.26-1_amd64.deb libteamdctl0_1.26-1_amd64.deb: libnl-%.deb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is wildcard in rule source really working? Why not use LIBNL-DEBS? |
||
pushd libteam; ./build.sh; popd | ||
|
||
quagga_0.99.24.1-2_amd64.deb: | ||
pushd quagga; ./build.sh; popd | ||
|
||
|
@@ -80,26 +83,29 @@ p4/syncd_1.0.0_amd64.deb p4/libsairedis_1.0.0_amd64.deb p4/libsairedis-dev_1.0.0 | |
mkdir -p p4 | ||
cp syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsairedis-dev_1.0.0_amd64.deb p4/ | ||
|
||
## Note: fpmsyncd is one implicit target | ||
brcm/swss_1.0.0_amd64.deb brcm/intfsyncd brcm/neighsyncd brcm/orchagent brcm/portsyncd brcm/routeresync brcm/swssconfig: brcm/syncd_1.0.0_amd64.deb brcm/libsairedis_1.0.0_amd64.deb brcm/libsairedis-dev_1.0.0_amd64.deb | ||
## Note: fpmsyncd and teamsyncd are two implicit targets | ||
brcm/swss_1.0.0_amd64.deb: brcm/syncd_1.0.0_amd64.deb brcm/libsairedis_1.0.0_amd64.deb brcm/libsairedis-dev_1.0.0_amd64.deb | ||
$(foreach dep, $^, $(call install_deb, $(dep))) | ||
$(call build_project, sonic-swss) | ||
cp swss_1.0.0_amd64.deb brcm/ | ||
cp sonic-swss/debian/swss/usr/bin/fpmsyncd . | ||
cp sonic-swss/debian/swss/usr/bin/teamsyncd . | ||
|
||
## Note: fpmsyncd is one implicit target | ||
mlnx/swss_1.0.0_amd64.deb mlnx/intfsyncd mlnx/neighsyncd mlnx/orchagent mlnx/portsyncd mlnx/routeresync mlnx/swssconfig: mlnx/syncd_1.0.0_amd64.deb mlnx/libsairedis_1.0.0_amd64.deb mlnx/libsairedis-dev_1.0.0_amd64.deb | ||
## Note: fpmsyncd and teamsyncd are two implicit targets | ||
mlnx/swss_1.0.0_amd64.deb: mlnx/syncd_1.0.0_amd64.deb mlnx/libsairedis_1.0.0_amd64.deb mlnx/libsairedis-dev_1.0.0_amd64.deb | ||
$(foreach dep, $^, $(call install_deb, $(dep))) | ||
$(call build_project, sonic-swss) | ||
cp swss_1.0.0_amd64.deb mlnx/ | ||
cp sonic-swss/debian/swss/usr/bin/fpmsyncd . | ||
cp sonic-swss/debian/swss/usr/bin/teamsyncd . | ||
|
||
## Note: fpmsyncd is one implicit target | ||
cavm/swss_1.0.0_amd64.deb cavm/intfsyncd cavm/neighsyncd cavm/orchagent cavm/portsyncd cavm/routeresync cavm/swssconfig: cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb | ||
## Note: fpmsyncd and teamsyncd are two implicit targets | ||
cavm/swss_1.0.0_amd64.deb: cavm/syncd_1.0.0_amd64.deb cavm/libsairedis_1.0.0_amd64.deb cavm/libsairedis-dev_1.0.0_amd64.deb | ||
$(foreach dep, $^, $(call install_deb, $(dep))) | ||
$(call build_project, sonic-swss) | ||
cp swss_1.0.0_amd64.deb cavm/ | ||
cp sonic-swss/debian/swss/usr/bin/fpmsyncd . | ||
cp sonic-swss/debian/swss/usr/bin/teamsyncd . | ||
|
||
p4/swss_1.0.0_amd64.deb: p4/syncd_1.0.0_amd64.deb p4/libsairedis_1.0.0_amd64.deb p4/libsairedis-dev_1.0.0_amd64.deb | ||
$(foreach dep, $^, $(call install_deb, $(dep))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
## This script is to build libteam | ||
## | ||
## USAGE: | ||
## ./build.sh | ||
|
||
# Obtain libteam | ||
rm -rf ./libteam | ||
git clone https://github.com/jpirko/libteam.git | ||
pushd ./libteam | ||
git checkout -f v1.26 | ||
popd | ||
|
||
git clone https://anonscm.debian.org/git/collab-maint/libteam.git tmp | ||
pushd ./tmp | ||
git checkout -f da006f2 # v1.26 | ||
popd | ||
mv tmp/debian libteam/ | ||
rm -rf tmp | ||
|
||
pushd ./libteam | ||
dpkg-buildpackage -rfakeroot -b -us -uc | ||
|
||
popd | ||
cp *.deb .. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to install the the latest libnl3 in this docker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved