-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
tarfile failure with long user ID #1013
Comments
Similar to the OP, I ran into the same issue. Also running in an user account (managed via corporate AD system), so I have a very high uid. I can confirm the same issue occurs under Linux (64-bit Ubuntu 16.04) for both Python 2.7.12 and 3.5.2:
And Python 3.5.2:
|
I did a bit of research and Android having busybox should handle GNU style tar files I manually changed the generated
and I was able to build and run the package using |
Should be fixed by #1015 |
Reopening as I found another issue with the above PR and had to revert it. |
Looking forward solving this issue, as i suffered also becouse of it. Manual modification as suggested helped. |
Just wanted to say that this issue still exists. I installed buildozer a few days ago. The suggestion above for f in $(fgrep -l USTAR_FORMAT $(find . -name build.py )); do
sed -i.bkp 's#USTAR_FORMAT#GNU_FORMAT#g' $f; done was really useful. |
Note this is a follow-on from the same effort which produced #1012, but I think the bugs are independent. I switched to Python 3 and the CrystaxNDK in an attempt to avoid NDK build errors, and got far enough to run into this.
While the dist's build.py is building its tar archive, I get
ValueError("overflow in number field")
:It seems the overflow is in the "uid" field, and I notice that my UID on my Mac (part of a corporate domain) is pretty high at 1730938684. Looking at the package in
tarfile.py
it seems this is a limitation of the USTAR format which the python-4-android builder is selecting specifically. The default GNU format can support much larger numbers, though I presume the unpacking code used in the Android package might not support it?I was able to work around this problem by running as a different local user account, so long as that account owns both the .python-for-android directory and the source input directory.
Since UID information isn't relevant when unpacking on Android it would be nice to discard it and make this not matter, if using the GNU tar format isn't an option. It doesn't look like the tarfile package gives the ability to do this directly, but you could chmod all the files to root (in a temporary location) before compressing them.
The text was updated successfully, but these errors were encountered: