Git Product home page Git Product logo

glibc-all-in-one's People

Contributors

a1gx avatar fr0ster avatar kirito0oo avatar lonnywong avatar matrix1001 avatar y7n05h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

glibc-all-in-one's Issues

Add a License

I noticed that the project lacks a license.
I want to use some code of this project in another project.
I hope this project can add a license to express the rules that "modify or use the code of this project".

support python3

diff --git a/update_list b/update_list
index 0551dff..b78f3cb 100755
--- a/update_list
+++ b/update_list
@@ -9,7 +9,7 @@ old_url = 'http://old-releases.ubuntu.com/ubuntu/pool/main/g/glibc/'

def get_list(url, arch):
content = requests.get(url).content

  • return re.findall('libc6_(2.[0-9][0-9]-[0-9]ubuntu[0-9.]*_{}).deb'.format(arch), content)
  • return re.findall('libc6_(2.[0-9][0-9]-[0-9]ubuntu[0-9.]*_{}).deb'.format(arch), content.decode('utf-8'))

Please merge to main branch

add --no-check-certificate in download

To avoid certificate problems, need to add '--no-check-certificate' in the download script:

  wget --no-check-certificate "$url"  -O debs/$deb_name || die "Failed to download package from $url"
  echo "  -> Extracting libc binary package"

  mkdir libs/$id
  ./extract debs/$deb_name libs/$id
  echo "  -> Package saved to libs/$id"

  # download debug info package
  local url="$SOURCE/$dbg_name"
  echo "  -> Location: $url"
  echo "  -> Downloading libc debug package"
  wget --no-check-certificate "$url" 2>/dev/null -O debs/$dbg_name || die "Failed to download package from $url"

Solve the problem of no debugging symbols in high versions of glibc

Solve the problem of no debugging symbols in high versions of glibc

Add cp -r $tmp/usr/lib/debug/.build-id/* /usr/lib/debug/.build-id/ 2>/dev/null to the line above the rm -rf $tmp command of the extract file.

--- extract	2022-10-31 15:36:48.748430597 +0800
+++ extract-patch	2022-10-31 15:42:27.990103399 +0800
@@ -33,8 +33,9 @@
       || cp -rP $tmp/usr/lib/debug/lib/*/* $out 2>/dev/null \
       || cp -rP $tmp/usr/lib/debug/lib32/* $out 2>/dev/null \
       || cp -rP $tmp/usr/lib/debug/.build-id $out 2>/dev/null \
-      || die "Failed to save. Check it manually $tmp"
+      || die "Failed to save. Check it manually $tmp"   
 
+    cp -r  $tmp/usr/lib/debug/.build-id/* /usr/lib/debug/.build-id/ 2>/dev/null
     rm -rf $tmp
 }


The extract script after patch is as follows

#!/bin/bash
cd "$(dirname "$0")"

die() {
  echo >&2 $1
  exit 1
}

usage() {
  echo -e >&2 "Usage: $0 deb output"
  exit 2
}

extract() {
    local deb=`readlink -f $1`
    local out=$2
    if [ ! -d "$out" ]; then
        mkdir $out
    fi
    local tmp=`mktemp -d`

    cd $tmp
    ar xv $deb || die "ar failed"
    if [ -f "data.tar.zst" ];then
        tar -I zstd -xf data.tar.* || die "tar failed"
    else
        tar xf data.tar.* || die "tar failed"
    fi
    cd -

    cp -rP $tmp/lib/*/* $out 2>/dev/null \
      || cp -rP $tmp/lib32/* $out 2>/dev/null \
      || cp -rP $tmp/usr/lib/debug/lib/*/* $out 2>/dev/null \
      || cp -rP $tmp/usr/lib/debug/lib32/* $out 2>/dev/null \
      || cp -rP $tmp/usr/lib/debug/.build-id $out 2>/dev/null \
      || die "Failed to save. Check it manually $tmp"
    
    cp -r  $tmp/usr/lib/debug/.build-id/* /usr/lib/debug/.build-id/ 2>/dev/null
    rm -rf $tmp
}

if [[ $# -ne 2 ]]; then
    usage
fi

extract "$1" "$2"

Note: Because files will be copied to the .build-id directory of the system, root privileges are required every time you run ./download.

Upgrade GDB version (may be required)

If your environment is ubuntu16 or 18, then the default GDB version is lower (GDB < 8.3) and does not support parsing the symbol files in .build-id. In this case, you need to upgrade the GDB version.

Version 9.2 is recommended, use the following methods to complete the upgrade

apt install texinfo
cp `which gdb` `which gdb`-old
cp `which gdbserver` `which gdbserver`-old
wegt http://ftp.gnu.org/gnu/gdb/gdb-9.2.tar.gz
tar -xzvf  gdb-9.2.tar.gz 
cd gdb-9.2 && mkdir build && cd build
../configure --with-python=`which python3` --enable-targets=all
make && make install

tar fail error when downloading glibc >= 2.34

I faced this error when trying to download the Glibc libraries whose versions are larger than 2.34.

┌──(kali㉿kali-linux)-[~/Downloads/glibc-all-in-one]
└─$ sudo ./download 2.35-0ubuntu3_amd64  
Getting 2.35-0ubuntu3_amd64
  -> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6_2.35-0ubuntu3_amd64.deb
  -> Downloading libc binary package
  -> Extracting libc binary package
x - debian-binary
x - control.tar.zst
x - data.tar.zst
tar (child): zstd: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar failed
  -> Package saved to libs/2.35-0ubuntu3_amd64
  -> Location: https://mirror.tuna.tsinghua.edu.cn/ubuntu/pool/main/g/glibc/libc6-dbg_2.35-0ubuntu3_amd64.deb
  -> Downloading libc debug package
  -> Extracting libc debug package
x - debian-binary
x - control.tar.zst
x - data.tar.zst
tar (child): zstd: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar failed
  -> Package saved to libs/2.35-0ubuntu3_amd64/.debug

A Little Advice

The default build target path is /glibc.
It will put the file to the root.
So we should let the user to input the target path not to build to the root path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.