-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libteam: Adding build.sh script and docker-team (#18)
- Loading branch information
1 parent
41cb73f
commit e61e299
Showing
6 changed files
with
105 additions
and
14 deletions.
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
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 .. | ||
|