-
Notifications
You must be signed in to change notification settings - Fork 274
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
[debian/rules] fail on script error during package build #1050
Merged
Conversation
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
On bullseye, the following build command does not fail when configure step is failing: ``` stepanb@3012cc6b379a:/sonic/src/sonic-sairedis$ fakeroot debian/rules binary-syncd ... configure: exit 1 dh_auto_configure: error: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking returned exit code 1 make[2]: *** [debian/rules:76: override_dh_auto_configure] Error 25 make[2]: Leaving directory '/sonic/src/sonic-sairedis' + dh binary -N syncd-rpc -N syncd-rpc-dbg -N syncd-vs -N syncd-vs-dbg --with autotools-dev dh: warning: The autotools-dev sequence is deprecated and replaced by dh in debhelper (>= 9.20160115) dh: warning: This feature will be removed in compat 12. debian/rules build make[2]: Entering directory '/sonic/src/sonic-sairedis' echo build stage is skipped. Please use binary to generate debian packages + DEB_BUILD_OPTIONS='nocheck parallel=12' ... dpkg-deb: building package 'libsairedis-dbg' in '../libsairedis-dbg_1.0.0_amd64.deb'. dpkg-deb: building package 'libsaivs-dbg' in '../libsaivs-dbg_1.0.0_amd64.deb'. dpkg-deb: building package 'libsaimetadata-dbg' in '../libsaimetadata-dbg_1.0.0_amd64.deb'. dpkg-deb: building package 'python-pysairedis' in '../python-pysairedis_1.0.0_amd64.deb'. dpkg-deb: building package 'python3-pysairedis' in '../python3-pysairedis_1.0.0_amd64.deb'. stepanb@3012cc6b379a:/sonic/src/sonic-sairedis$ echo $? 0 ``` On previous buster, however, this command fails as expected: ``` stepanb@99083f3297fd:/sonic/src/sonic-sairedis$ fakeroot debian/rules binary-syncd ... checking whether CXX supports -Wno-cast-function-type... yes checking SAI headers API version and library version check... failed configure: error: "SAI headers API version and library version mismatch" make[1]: *** [Makefile:404: config.status] Error 1 make[1]: Leaving directory '/sonic/src/sonic-sairedis' dh_auto_install: error: make -j1 install DESTDIR=/sonic/src/sonic-sairedis/debian/tmp AM_UPDATE_INFO_DIR=no returned exit code 2 make: *** [debian/rules:47: binary-syncd] Error 2 stepanb@99083f3297fd:/sonic/src/sonic-sairedis$ echo $? ``` It is required to have -e in .SHELLFLAGS to fail on such errors. This change also fixes pysairedis install files. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
6 tasks
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
6 tasks
kcudnik
approved these changes
May 31, 2022
lguohan
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Jun 4, 2022
…llseye (#10950) To not try to build python2 bindings for sairedis for bullseye. The same solution was done for swss-common package. Releated changes sonic-net/sonic-sairedis#1050 Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
@kcudnik could you please help to merge? |
kcudnik
approved these changes
Jun 14, 2022
lguohan
pushed a commit
that referenced
this pull request
Jun 16, 2022
In azp run, the following failure always happens at the stage of `make check` of building syncd. ``` Making check in syncd make[2]: Entering directory '/__w/1/s/syncd' make check-TESTS make[3]: Entering directory '/__w/1/s/syncd' tests: tests.cpp:843: void test_watchdog_timer_clock_rollback(): Assertion `settimeofday(¤tTime, NULL) == 0' failed. /bin/bash: line 5: 13004 Aborted (core dumped) ${dir}$tst FAIL: tests ``` The execution of `settimeofday(¤tTime, NULL)` fails in slave docker with errno **EPERM**, because CAP_SYS_TIME capability is dropped in docker. Using option `--privileged` gives docker extended privileges for its success. This failure has existed for a long time in azp build and is not exposed till #1050.
stepanblyschak
added a commit
to stepanblyschak/sonic-buildimage
that referenced
this pull request
Jul 1, 2022
…llseye (sonic-net#10950) To not try to build python2 bindings for sairedis for bullseye. The same solution was done for swss-common package. Releated changes sonic-net/sonic-sairedis#1050 Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
pettershao-ragilenetworks
pushed a commit
to pettershao-ragilenetworks/sonic-sairedis
that referenced
this pull request
Nov 18, 2022
pettershao-ragilenetworks
pushed a commit
to pettershao-ragilenetworks/sonic-sairedis
that referenced
this pull request
Nov 18, 2022
In azp run, the following failure always happens at the stage of `make check` of building syncd. ``` Making check in syncd make[2]: Entering directory '/__w/1/s/syncd' make check-TESTS make[3]: Entering directory '/__w/1/s/syncd' tests: tests.cpp:843: void test_watchdog_timer_clock_rollback(): Assertion `settimeofday(¤tTime, NULL) == 0' failed. /bin/bash: line 5: 13004 Aborted (core dumped) ${dir}$tst FAIL: tests ``` The execution of `settimeofday(¤tTime, NULL)` fails in slave docker with errno **EPERM**, because CAP_SYS_TIME capability is dropped in docker. Using option `--privileged` gives docker extended privileges for its success. This failure has existed for a long time in azp build and is not exposed till sonic-net#1050.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On bullseye, the following build command does not fail when configure
step is failing:
On previous buster, however, this command fails as expected:
It is required to have -e in .SHELLFLAGS to fail on such errors.
Also, fixed install pathes for python bindings and disabled python2 bindings when DEB_BUILD_PROFILES=nopython2 is passed.
Signed-off-by: Stepan Blyschak stepanb@nvidia.com