Open ANogin opened 7 months ago
Hm, it seems that simply moving these requirements from ofrak_core/setup.py
to ofrak_core/requirements-test.txt
would address most of the negative effects of this - this way, the ofrak_angr
and ofrak_capstone
would still be downloaded from PyPI, but it will happen once in base.Dockerfile
, and no further PyPI interaction would happen at the make develop
stage. (This would be undoing #294 in that respect - not sure why @EdwardLarson wanted/needed to move these dependencies). That said, if the local ofrak_angr
/ofrak_capstone
have requirements that are incompatible with the PyPI ones, then they will likely still "fight" during make develop
.
@EdwardLarson @whyitfor any thoughts?
[Edited to add: I implemented this approach in #420 and it works there, but when merged with #417, then during make develop
, there is indeed a "fight" about the version of angr to install.]
Chiming in to add that I have raised this internally to @whyitfor, and I second that it needs to be addressed. We did not come to any conclusions in our disucssion about a clear path forward.
What is the problem? (Here is where you provide a complete Traceback.)
226 introduced an unfortunate issue (which I discovered using PR #218 - IMHO we really out to land that one, and use in CI) - when the docker build runs
make develop
, it would first go toofrak_core
, where the new"test": "ofrak_angr~=1.0", "ofrak_capstone~=1.0"]
dependency would cause it to downloadofrak_angr
from PyPI, then it would go intoofrak_angr
and then themake develop
there would overwrite the downloaded one with the local one (and similar withofrak_capstone
). With #417, this means that not only theofrak_angr
itself is downloaded from PyPI, but also theangr
itself and all its dependencies installed inbase.Dockerfile
are updated to the versions required by theofrak_angr
from PyPI. Thenmake develop
would put them all back.Please provide some information about your environment. N/A
If you've discovered it, what is the root cause of the problem? See above.
How often does the issue happen? Always.
What are the steps to reproduce the issue? See above.
How would you implement this fix? Ideally, we ought to get rid of the
"test": "ofrak_angr~=1.0", "ofrak_capstone~=1.0"]
dependency. But no idea what that would take.Are there any (reasonable) alternative approaches?
Options:
base.Dockerfile
and not rely on PyPI inmake develop
afterwards. Seems pretty suboptimal in the long run…make develop
firstpip install -e .
without[test]
, inofrak_core
, thenmake develop
inofrak_angr
, then go back and do a fullmake develop
inofrak_core
. I see three ways, none ideal:develop
target inofrak_core/Makefile
to do this when../ofrak_angr
exists. The downside is that this has a very unexpected side-effect for people calling this make develop for other reasonsbuild_image.py
for making the"$INSTALL_TARGET:
rule in top-levelMakefile
now do this special thing forofrak_core
(that is, when callingmake develop
for each component in order, callmake develop_no_test
inofrak_core
instead, then go back and callmake -C ofrak_core develop
at the end). OK, but special-case'ingofrak_core
is not very clean.build_image.py
create a top-levelMakefile
do two passes through each components - first domake -C {package_name) develop1
for each package, thenmake -C {package_name) develop2
, and change all package makefiles to havedevelop1: develop
anddevelop2:
whileofrak_core
would havedevelop1
dopip install -e .
anddevelop2:develop
. Does not hardcode a special case forofrak_core
, but requires changing all the package Makefiles...Are you interested in implementing it yourself? Not for the ideal approach - do not know enough. I could implement one of the alternative approaches, but do not know which would be preferred.