GNS3 Docker Images
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

debian-get_libc-i386 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. set -e
  3. LIB_DIR=/libc-i386
  4. # install debian i386 libraries
  5. dpkg --add-architecture i386
  6. apt-get update
  7. DEBIAN_FRONTEND=noninteractive apt-get -y install libssl1.0.0:i386
  8. # copy i386 libraries
  9. mkdir -p "$LIB_DIR/lib/i386-linux-gnu"
  10. cp -a /lib/ld-linux.so.2 "$LIB_DIR/lib/"
  11. cp -a /lib/i386-linux-gnu/ld* "$LIB_DIR/lib/i386-linux-gnu/"
  12. cp -a /lib/i386-linux-gnu/libc[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
  13. cp -a /lib/i386-linux-gnu/libdl[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
  14. cp -a /lib/i386-linux-gnu/libgcc_s[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
  15. cp -a /lib/i386-linux-gnu/libm[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
  16. cp -a /lib/i386-linux-gnu/libpthread[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
  17. cp -a /usr/lib/i386-linux-gnu/libcrypto[-.]* "$LIB_DIR/lib/i386-linux-gnu/"
  18. ln -s libcrypto.so.1.0.0 "$LIB_DIR/lib/i386-linux-gnu/libcrypto.so.4"
  19. # include copyright files
  20. DOC_DIR=$LIB_DIR/usr/share/doc/libc-i386
  21. for pkg in gcc-4.9-base libc6 libssl1.0.0; do
  22. mkdir -p "$DOC_DIR/$pkg"
  23. cp -a "/usr/share/doc/$pkg/copyright" "$DOC_DIR/$pkg/"
  24. done
  25. # store in tar archive
  26. echo
  27. echo "Storing i386 libs into libc-i386.tar.gz..."
  28. echo
  29. tar -cvvzf /base/libc-i386.tar.gz -C "$LIB_DIR" $(ls $LIB_DIR)
  30. chown --reference=/base /base/libc-i386.tar.gz