Skip to content
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

update libpcap to 1.10.3 for *-dev variants #2827

Closed
etungsten opened this issue Feb 24, 2023 · 1 comment · Fixed by #3264
Closed

update libpcap to 1.10.3 for *-dev variants #2827

etungsten opened this issue Feb 24, 2023 · 1 comment · Fixed by #3264
Labels
area/core Issues core to the OS (variant independent) status/research This issue is being researched type/enhancement New feature or request

Comments

@etungsten
Copy link
Contributor

etungsten commented Feb 24, 2023

Currently unable to build tcpdump with libpcap 1.10.3 due to check-rpaths finding an invalid RPATH in the built binary:

#18 9.621 + /usr/lib/rpm/check-buildroot                                                                                                                                                                                                                                                
  #18 9.643 + '[' 0 -eq 0 ']'                                                                                                                                                                                                                                                             
  #18 9.643 + mkdir -p /home/builder/rpmbuild/BUILDROOT/bottlerocket-aarch64-tcpdump-4.99.3-1.aarch64/aarch64-bottlerocket-linux-gnu/sys-root/usr/share/licenses/tcpdump                                                                                                                  
  #18 9.645 + echo 'bottlerocket-aarch64-tcpdump - http://www.tcpdump.org'                                                                                                                                                                                                                
  #18 9.645 + echo 'SPDX-License-Identifier: BSD-3-Clause'                                                                                                                                                                                                                                
  #18 9.645 + /usr/lib/rpm/brp-compress                                                                                                                                                                                                                                                   
  #18 9.648 + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/aarch64-bottlerocket-linux-gnu-strip                                                                                                                                                                                             
  #18 9.655 + /usr/lib/rpm/brp-strip-static-archive /usr/bin/aarch64-bottlerocket-linux-gnu-strip                                                                                                                                                                                           #18 9.714 + /usr/lib/rpm/check-rpaths                                                                                                                                                                                                                                                     #18 9.960 *******************************************************************************                                                                                                                                                                                               
  #18 9.960 *                                                                                                                                                                                                                                                                             
  #18 9.960 * WARNING: 'check-rpaths' detected a broken RPATH OR RUNPATH and will cause                                                                                                                                                                                                   
  #18 9.960 *          'rpmbuild' to fail. To ignore these errors, you can set the                                                                                                                                                                                                        
  #18 9.960 *          '$QA_RPATHS' environment variable which is a bitmask allowing the                                                                                                                                                                                                  
  #18 9.960 *          values below. The current value of QA_RPATHS is 0x0000.                                                                                                                                                                                                            
  #18 9.960 *                                                                                                                                
  #18 9.960 *    0x0001 ... standard RPATHs (e.g. /usr/lib); such RPATHs are a minor                                                                                                                                                                                                      
  #18 9.960 *               issue but are introducing redundant searchpaths without                                                                                                                                                                                                       
  #18 9.960 *               providing a benefit. They can also cause errors in multilib                                                                                                                                                                                                   
  #18 9.960 *               environments.                                                                                                    
  #18 9.960 *    0x0002 ... invalid RPATHs; these are RPATHs which are neither absolute                                                                                                                                                                                                   
  #18 9.960 *               nor relative filenames and can therefore be a SECURITY risk                                                                                                                                                                                                   
  #18 9.960 *    0x0004 ... insecure RPATHs; these are relative RPATHs which are a                                                                                                                                                                                                        
  #18 9.960 *               SECURITY risk                                                                                                                                                                                                                                                 
  #18 9.960 *    0x0008 ... the special '$ORIGIN' RPATHs are appearing after other                                                                                                                                                                                                        
  #18 9.960 *               RPATHs; this is just a minor issue but usually unwanted                                                                                                                                                                                                       
  #18 9.960 *    0x0010 ... the RPATH is empty; there is no reason for such RPATHs                                                                                                                                                                                                        
  #18 9.960 *               and they cause unneeded work while loading libraries                                                                                                                                                                                                          
  #18 9.960 *    0x0020 ... an RPATH references '..' of an absolute path; this will break                                                                                                                                                                                                 
  #18 9.960 *               the functionality when the path before '..' is a symlink                                                                                                                                                                                                      
  #18 9.960 *                                                                                                                                
  #18 9.960 *                                                                                                                                                                                                                                                                             
  #18 9.960 * Examples:                                                                                                                      
  #18 9.960 * - to ignore standard and empty RPATHs, execute 'rpmbuild' like                                                                                                                                                                                                              
  #18 9.960 *   $ QA_RPATHS=$(( 0x0001|0x0010 )) rpmbuild my-package.src.rpm                                                                                                                                                                                                              
  #18 9.960 * - to check existing files, set $RPM_BUILD_ROOT and execute check-rpaths like                                                                                                                                                                                                
  #18 9.960 *   $ RPM_BUILD_ROOT=<top-dir> /usr/lib/rpm/check-rpaths                                                                                                                                                                                                                      
  #18 9.960 *                                                                                                                                                                                                                                                                             
  #18 9.960 *******************************************************************************                                                                                                                                                                                               
  #18 9.960 ERROR   0002: file '/aarch64-bottlerocket-linux-gnu/sys-root/usr/bin/tcpdump' contains an invalid rpath '/aarch64-bottlerocket-linux-gnu/sys-root/usr/lib' in [/aarch64-bottlerocket-linux-gnu/sys-root/usr/lib]

For reference: tcpdump changelog
For reference: libpcap changelog

@etungsten etungsten added type/enhancement New feature or request status/needs-triage Pending triage or re-evaluation area/core Issues core to the OS (variant independent) labels Feb 24, 2023
@etungsten
Copy link
Contributor Author

I'm starting to realize this might have more to do with libpcap than tcpdump. If I keep libpcap to version 1.10.1 then tcpdump 4.99.3 builds just fine without any modifications to the spec file.

libpcap 1.10.2 is a really big release with a bunch of changes, but I'm guessing one of these changes might have to do with it:

the-tcpdump-group/libpcap@84cb8cf
the-tcpdump-group/libpcap@c4f093f

As a result, I'm gonna morph this issue into an issue about updating libpcap.

@etungsten etungsten changed the title update tcpdump to 4.99.3 for *-dev variants update libpcap to 1.10.3 for *-dev variants Feb 24, 2023
@stmcginnis stmcginnis added status/research This issue is being researched and removed status/needs-triage Pending triage or re-evaluation labels Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues core to the OS (variant independent) status/research This issue is being researched type/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants