Commit Graph

81 Commits

Author SHA1 Message Date
xtex d6505b9b8c
Add support for AOSC OS (#2390) 2024-08-26 14:28:21 +02:00
Jason An a6c1209a68
suppress unintended output in setup.sh (#2252) 2024-06-24 11:22:46 -07:00
Raffi Utama ffc09e57f3
add feature to detect command pacman (#2228) 2024-06-12 22:14:56 +02:00
k4lizen 20f8fe044c
add artix to pacman installed distros (#2226) 2024-06-12 14:36:25 +02:00
卂フ卂ㄚ Ҝㄖ卩卩卂Ҝ卂 919d740415
Using Poetry to install all dependencies (#2221)
* Switch to Poetry for dependency management in setup

* Added curl dependency and removed python-pip and python3-pip

---------

Co-authored-by: B1N4RY-P4R45173 <kopakaajay123@gmail.com>
2024-06-11 08:15:16 -07:00
Disconnect3d 00028a80ce
Fix lint issue in setup.sh (#2213) 2024-06-07 17:37:27 +02:00
xtex d0e54b8e44
Fix dependency installation on openSUSE Tumbleweed (#2211)
* Fix dependency installation on openSUSE Tumbleweed

openSUSE Tumbleweed no longer includes python2-pip

* Update setup.sh

---------

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2024-06-07 13:59:03 +02:00
Uros Lazic 8d067127a7
add archcraft to the list of arch-based distros (#2083)
Co-authored-by: Uros Lazic <uros.lazic@protonmail.com>
2024-03-23 00:54:47 +01:00
nu1lptr bb5de91228
Update setup.sh (#2073)
Gentoo gdb package have been changed to dev-debug/gdb and emerge command needs root privilege to run.
2024-03-11 17:39:47 +01:00
Disconnect3d e8f423ac4f
Prepare 2024.02.14 release (#2020) 2024-02-14 19:50:03 +01:00
xtex 266ce01a12
Attempt to enable repo-oss-debug first (#1997) 2024-01-09 13:20:14 +01:00
xtex 91d1a044b5
Try repo-oss-debug if repo-debug is not present (#1977) 2024-01-02 14:00:53 +01:00
psondej ab96e1a9b9 - remove gdb-pt-dump from all files
- remove submodules from all files
- bump flake.lock
- add gdb-pt-dump as dependency
- fix building Dockerfile
- fix gdb-pt-dump was broken on portable packages
2023-11-02 03:10:36 +01:00
disconnect3d 92781b7cf9 fix arch ci 2023-09-29 01:13:44 +02:00
Daniele a198bb30cb Remove pacman partial upgrades 2023-09-05 11:56:35 +02:00
qrxnz 2dc00e885c add cachyos 2023-09-05 09:30:26 +02:00
Aaron Adams d81e5da297 switch to an editable environment 2023-08-17 15:43:35 +02:00
Patryk Sondej 225d05ad8b fix dockerfile caching 2023-08-06 16:16:53 +02:00
Patryk Sondej f3914e2696 init add portable pwndbg using nix, package for rpm,deb,arch,alpine
Signed-off-by: Patryk Sondej <patryk.sondej@gmail.com>
2023-08-06 16:16:53 +02:00
Xeonacid 4fdd72e4f6
pacman: only install not-installed deps (#1845)
Signed-off-by: Xeonacid <h.dwwwwww@gmail.com>
2023-07-29 23:58:42 +02:00
RHL120 37fcc691b5
Add support for FreeBSD (#1832)
* Use /bin/sh instead of /bin/bash

* Install the required freebsd packages and remove some bashisms

* Reuse bash

* Attempt to fix the linter

* Fix the linter
2023-07-24 22:59:11 +02:00
intrigus-lgtm 7d9d2dc1de
Fix codecov (#1792)
* Fix coverage combine toml issue

This commit should fix this issue:
```
Run coverage combine
  coverage combine
  coverage xml
  shell: /usr/bin/bash -e {0}
Can't read 'pyproject.toml' without TOML support. Install with [toml] extra
Error: Process completed with exit code 1.
```

* setup.sh: cleanup the --user flag since we use venv now

Cleans up the --user flag from setup.sh since it is unused after we changed setup.sh to install Python dependencies in a virtual environment

* Remove --user flag from CI workflows

* Fix codecov problem

We need to run the python `coverage` library to collect coverage.
However, gdb was failing to find it.

Recently, pwndbg moved to using venvs. When pwndbg is initialized
it setups the venv "manually", that is, no "source .venv/bin/activate"
is needed. When we run gdb tests, we pass the `gdbinit.py` of pwndbg as a
command to gdb to be executed like this:
`gdb --silent --nx --nh -ex 'py import coverage;coverage.process_startup()' --command PATH_TO_gdbinit.py`
The problem is that *order* matters. This means that *first* coverage
is imported (by `-ex py ...`)  and only *then* the init script is executed.
When `coverage` is first imported, it's library search path only looks
in system libraries of python, and not the venv that gdbinit.py would load.
So we would try to import an old version of coverage and fail.

One solution would be to move around the commands, but this would be an
ugly hack IMHO. **Instead**, we should just tell gdb that this is an **init**
command that has to be executed before other commands.

Previously, the order did not matter. All of pwndbg's dependencies were
installed directly as system libraries to python. So the library search path
was the same before and after loading `gdbinit.py`.

---------

Co-authored-by: disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: intrigus <abc123zeus@live.de>
2023-07-11 20:27:25 +02:00
Disconnect3d 976363a3d8
Setup.sh use virtualenv (#1780)
* Change setup.sh to create & use Python virtualenv

The `setup.sh` script now creates a `.venv` directory during execution and installs all dependencies into that directory. Then, `gdbinit.py` will adds the proper `site-packages` directory as the first item of `sys.path`.

Fixes #1634.
2023-07-05 13:11:59 +02:00
Disconnect3d 5d0e3ec067
Fix Ubuntu 22.04 CI build by installing libgcc-s1:i386 (#1716) 2023-05-18 03:29:39 +02:00
Alexandru Gabriel Bradatan d7c0e2aee7
Include opensuse-tumbleweed in setup.sh (#1710) 2023-05-17 00:12:16 +02:00
AlEscher 424c21a6be
Allow garuda install (#1680) 2023-04-22 11:20:54 +02:00
Albert Koczy d3b1a91c1c
Add support for Arch Linux ARM in setup.sh (#1672)
Technically Arch Linux ARM is a separate distro from the x86_64 Arch Linux, but it uses pcaman and the same package names. So it installs just fine, just needs to be detected properly.
2023-04-18 19:36:06 +02:00
Alex Chen ca5e6f579a
Add update mode for setup.sh (#1660)
* Add update mode for setup.sh

* Use basic for loop instead of getopts

* Lint
2023-04-06 11:02:36 +02:00
Disconnect3d 7ba82ef571
Fix shfmt lint issue in setup.sh (#1642) 2023-03-24 15:14:30 +01:00
Disconnect3d cf63cc326e
Fix setup.sh on MacOS due to gnu vs bsd sed (#1635) 2023-03-20 00:49:01 +01:00
Cycatz 80fbb375a7
Improve installation process (#1620)
Now the installation process contains the following steps:
1. Check for any line with source <gdbinit.py> before installation
2. If any, ask the user if they want to proceed
3. After the installation, comment out old source <gdbinit.py> lines if any and add a new source <gdbinit.py> line.

A check for presence of the line set debuginfod enabled on is also added to avoid being appended repeatedly.
2023-03-15 20:30:24 +01:00
CptGibbon 613ed2c88e
Add gdbserver dependency to Ubuntu build (#1514) 2023-01-10 09:04:23 -08:00
Mario Haustein d5f6b4669d Remove dependency to `python-future` (#1250)
`python-future` isn't used in the entire code and abandoned upstream. The
module `__future__` is a Python builtin instead.

Closes #1250
2022-12-26 20:46:43 +01:00
Xeonacid 64b0102939
install git and pip for pacman-based distro (#1377) 2022-11-14 20:18:07 -08:00
Xeonacid 8c55c9a368
Use --noconfirm for pacman (#1376)
Act same as -y for apt. Don't ask for confirmation.
2022-11-14 15:20:47 +01:00
Disconnect3d cbba631648
fix lint (#1356) 2022-10-30 21:51:00 +01:00
tuxfobux df1d7f2256
Add Arch Linux support to setup.sh (#1334) 2022-10-27 01:22:58 +02:00
Gulshan Singh ac5a6ebe64
Minor lint and pre-hook changes (#1349) 2022-10-25 17:46:53 -07:00
Gulshan Singh cc50024417
Format shell scripts with shfmt (#1123)
* Add lint.sh script

* Format shell scripts with shfmt and add to lint.sh

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2022-09-05 13:24:52 +02:00
조희원 44286afe0f Fix installation error on osx 2022-04-28 14:56:43 +02:00
ToBeatElite 6d2b6c64d6 . 2021-12-09 01:43:08 +01:00
ToBeatElite 5a39da7068 moved block to source gdbinit
when the linux distro is not supported or is arch based, the setup.sh exits after giving install instructions and before sourcing the gdbinit. by moving this block to before any ``exit 1``'s are called, making it so that the source line is always there no matter what.
2021-12-09 01:43:08 +01:00
ToBeatElite a1c9d09ed9 added little blurb for endeavourOS 2021-12-07 23:27:42 +01:00
Samanta Navarro 38c38aacfa Fix typos
Typos found with codespell.
2021-12-05 13:37:10 +01:00
Przemysław Buczkowski b203d53b8a SLES/OpenSUSE: enable debugging repo before installing
Package glibc-debuginfo, which is a requirement,
requires repo-debug to be enabled, which is not enabled
by default.

This commit enables this repo when installing if it is
not already enabled.
2021-09-29 03:37:35 +02:00
Matteo Rizzo 45dd669a23 Make setup.sh work with Podman
Containers created with Podman (https://podman.io/) don't have a
.dockerenv file in the root directory, so setup.sh tries to invoke sudo.
This doesn't work because podman containers can't use sudo (the
processes inside the container run as an unprivileged user).
This removes the check for .dockerenv. The other checks should already
be sufficient to detect that it's running in a container without sudo.
2021-08-02 23:23:07 +02:00
Victor Chan 26a18f1d70
Remove quotes from command option interpolation (#876)
There was a quoting bug as `INSTALLFLAGS` contains both the option key and value.
This causes the subsequent commands to look something like `python ... '--target foo'...`, causing
the command to treat the entire string `--target foo` as an option key rather than a key-value pair.
2021-01-03 08:51:50 +01:00
Israel Alberto RV bf49bf8356
Unit test fix (#868)
* Fixed the failed unit testing; Improved the Dockerfile, again.

* Fixed missing new line joiner in the Dockerfile.

* Fixed the default Python version from 2 to 3.

* Moved the installation of the nasm and golang packages to the setup script.

* Fixed the extra quotes which fails the sudo check.

* Added to the Git ignore file the output files assembled and linked in the test binaries.

* Removed the output files from test binaries.

* Added to the Git ignore file the virtual environment directory.

* Added sudo to the remove and link the Python3 binary.

* Added commands related to GO, to check why is failing.

* Fixed the installation of GO, only install if not exists in Ubuntu.

* Fixed the first test built in Assembler. Checks if it is working in GitHub.

* Fixed the problem with all the assembler tests; Extracted the asserts into methods, avoiding duplicates.

* Fixed some test, should be fail the Travis tests.

* Fixed one test for Travis.

* Fixed the asserts, now find all ecpected items into the output.

* Fixed the split message, joined again.

* Fixed the last error test for loads binary.

* Fixed one missing number in the comparison.

* Fixed the first Lint errors.

* Added comment in the Dockerfile.

The commented line about `git submodule`.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549075767

* Removed NASM and Go from the setup.

Created a new bash script to install them and added to the Dockerfile.

https://github.com/pwndbg/pwndbg/pull/868/files#r549075931

https://github.com/pwndbg/pwndbg/pull/868/files#r549076078

* Added the setup script in the GitHub test workflow.

https://github.com/pwndbg/pwndbg/pull/868/files#r549075931

https://github.com/pwndbg/pwndbg/pull/868/files#r549076078

* Testing the emulate cases.

It should be fail. I commented the emulation for the address 0x401000.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549111511

* Fixed the different start addresses in the assembler test.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549111511

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549075485

* Experimenting with the python location.

Commented the remove python binary and added some logs.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549076170

* Removed the commands about delete Python and link the Python3.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549076170
2020-12-31 04:35:52 +01:00
roptimizer bde3637791
added fix for i386 libc6-dbg package. (#859) 2020-12-02 15:14:15 +01:00
Tobias Faller b209c2b54e
Added installation configuration for Gentoo (#820)
* Added installation configuration for Gentoo

* Added check for sudo command
2020-09-17 14:24:06 +02:00