package/netsnmp: fix script net-snmp-create-v3-user's usage of 'ps'.
PATCH 1/1 package/netsnmp: fix script net-snmp-create-v3-user's usage of 'ps'.
net-snmp-create-v3-user uses ps to check if snmpd is running. To know how to invoke 'ps', the build system use 'which ps' and does other checks for the output format of 'ps', therefore inspecting 'ps' on the build machine instead of the target.
If the build machine runs a OS like Debian, that uses a merged-usr and a PATH of '/usr/bin:/bin', then 'which ps' returns /usr/bin/ps, which will not work on the target if it does not also use a merged-usr.
Hardcode 'ps' to be /bin/ps to fix this issue and to improve build reproducibility.
--- package/netsnmp/netsnmp.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/netsnmp/netsnmp.mk +3 -1
@@ -12,7 +12,9 @@ NETSNMP_LICENSE_FILES = COPYING NETSNMP_CPE_ID_VENDOR = net-snmp NETSNMP_CPE_ID_PRODUCT = $(NETSNMP_CPE_ID_VENDOR) NETSNMP_INSTALL_STAGING = YES -NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=no +NETSNMP_CONF_ENV = \ + ac_cv_NETSNMP_CAN_USE_SYSCTL=no \ + ac_cv_path_PSPROG=/bin/ps NETSNMP_CONF_OPTS = \ --with-persistent-directory=/var/lib/snmp \ --with-defaults \
Signature · 1 line
2.31.0
Yann E. MORIN
AppliedPATCH 1/1 package/netsnmp: fix script net-snmp-create-v3-user's usage of 'ps'.
Nicolas, All,
On 2021-03-31 10:14 +0200, Nicolas Cavallari spake thusly:
Quoted 5 lines
net-snmp-create-v3-user uses ps to check if snmpd is running. To know how to invoke 'ps', the build system use 'which ps' and does other checks for the output format of 'ps', therefore inspecting 'ps' on the build machine instead of the target.
Quoted 8 lines
If the build machine runs a OS like Debian, that uses a merged-usr and a PATH of '/usr/bin:/bin', then 'which ps' returns
/usr/bin/ps, which will not work on the target if it does not also use a merged-usr.Hardcode 'ps' to be
/bin/psto fix this issue and to improve build reproducibility.Signed-off-by Nicolas Cavallari <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 26 lines
--- package/netsnmp/netsnmp.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)package/netsnmp/netsnmp.mk +3
-1@@ -12,7 +12,9 @@ NETSNMP_LICENSE_FILES = COPYING NETSNMP_CPE_ID_VENDOR = net-snmp NETSNMP_CPE_ID_PRODUCT = $(NETSNMP_CPE_ID_VENDOR) NETSNMP_INSTALL_STAGING = YES -NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=no +NETSNMP_CONF_ENV = \ + ac_cv_NETSNMP_CAN_USE_SYSCTL=no \ + ac_cv_path_PSPROG=/bin/ps NETSNMP_CONF_OPTS = \ --with-persistent-directory=/var/lib/snmp \ --with-defaults \Signature · 6 lines
2.31.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/netsnmp: fix script net-snmp-create-v3-user's usage of 'ps'.
In reply to Nicolas CavallariQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Nicolas" == Nicolas Cavallari <[email protected]> writes:
net-snmp-create-v3-user uses ps to check if snmpd is running. To know how to invoke 'ps', the build system use 'which ps' and does other checks for the output format of 'ps', therefore inspecting 'ps' on the build machine instead of the target.
Quoted 8 lines
If the build machine runs a OS like Debian, that uses a merged-usr and a PATH of '/usr/bin:/bin', then 'which ps' returns
/usr/bin/ps, which will not work on the target if it does not also use a merged-usr.Hardcode 'ps' to be
/bin/psto fix this issue and to improve build reproducibility.Signed-off-by Nicolas Cavallari <[email protected]>
Committed to 2020.02.x, 2020.11.x and 2021.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard