hashbang/os

make: *** [fetch] Error 1

elproducto opened this issue · 14 comments

Getting the following error, seems the string /opt/android/manifests is getting picked up as a git repository.

~/os$ make DEVICE=marlin keys
docker run
-it
-h "android"
-v android:/home/build
-v /home/elproducto/os:/opt/android
hashbang/os bash -c "fetch"
Get /opt/android/manifests
fatal: '/opt/android/manifests' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: '/opt/android/manifests' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: cannot obtain manifest /opt/android/manifests
Makefile:28: recipe for target 'fetch' failed
make: *** [fetch] Error 1

If you are running latest master, the manifests are now committed as part of the repo like a "lockfile". They end up in /opt/android/manifests only if you have rebuilt your image.

"make image" first then see if you are sorted

@lrvick thanks for your help through these issues. make image command worked successfully, however when I issue the "make DEVICE=marlin keys" command I got the same error as above. Next thing I tried was removing all docker images, and volumes. I then issued the "make DEVICE=marlin keys" command again and got the same error as above.

Okay I was able to reproduce in a clean env, and made some fixes in master. Give it another go.

Tried Make keys command again. I got the following after about 35 minutes.

Resolving deltas: 100% (1910318/1910318), done.
From https://android.googlesource.com/platform/frameworks/base

  • [new tag] android-9.0.0_r30 -> android-9.0.0_r30

error: Exited sync due to fetch errors
Makefile:28: recipe for target 'fetch' failed
make: *** [fetch] Error 1

If you do this multiple times do you get the same results? I can't reproduce this, but could just be a network blip.

NVM reproduced by deleting my basedir and starting from scratch again. Pushed manifest updates to master. Looks like AndroidHardeningProject force pushed to one of their repos.

I got past make key command. However, got the following with make DEVICE=marlin clean build release. Is there any recommendations on how to speedup build process, i threw 8 vCPU at the VM, but does not seem to speed things up. I am kicking of the make ... release command again to see if it get past this error.

ERROR at //skia/BUILD.gn:54:13: Undefined identifier defines = skia_for_chromium_defines ^------------------------ See //BUILD.gn:71:5: which caused the file to be included. "//skia:skia_unittests", ^---------------------- Makefile:57: recipe for target 'build' failed make: *** [build] Error 1

Build successful but error int the next step.

build completed successfully

/home/build
docker run
-it
-h "android"
-v android:/home/build
-v /home/elproducto/os:/opt/android
-v /home/elproducto/os/release:/home/build/release
-e DEVICE=marlin
hashbang/os release
Running sign_target_files_apks
Enter password for /home/build/keys/marlin/media key>
Enter password for /home/build/keys/marlin/platform key>
Enter password for /home/build/keys/marlin/releasekey key>
Enter password for /home/build/keys/marlin/shared key>
Rewriting BOOT/RAMDISK/default.prop:
Rewriting BOOT/RAMDISK/prop.default:
replace: ro.bootimage.build.fingerprint=Android/aosp_marlin/marlin:9/PQ2A.190205.003/12022314:user/test-keys
with: ro.bootimage.build.fingerprint=Android/aosp_marlin/marlin:9/PQ2A.190205.003/12022314:user/release-keys
replace: ro.build.display.id=PQ2A.190205.003 test-keys
with: ro.build.display.id=PQ2A.190205.003
replace: ro.build.tags=test-keys
with: ro.build.tags=release-keys
replace: ro.build.description=aosp_marlin-user 9 PQ2A.190205.003 12022314 test-keys
with: ro.build.description=aosp_marlin-user 9 PQ2A.190205.003 12022314 release-keys
replace: ro.build.fingerprint=Android/aosp_marlin/marlin:9/PQ2A.190205.003/12022314:user/test-keys
with: ro.build.fingerprint=Android/aosp_marlin/marlin:9/PQ2A.190205.003/12022314:user/release-keys
replace: ro.vendor.build.fingerprint=Android/aosp_marlin/marlin:9/PQ2A.190205.003/12022314:user/test-keys
with: ro.vendor.build.fingerprint=Android/aosp_marlin/marlin:9/PQ2A.190205.003/12022314:user/release-keys
Rewriting ROOT/default.prop:
signing: BasicDreams.apk (/home/build/keys/marlin/releasekey)
java.lang.ClassCastException: org.bouncycastle.asn1.DLSequence cannot be cast to org.bouncycastle.asn1.ASN1Integer
at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.(PrivateKeyInfo.java:79)
at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getInstance(PrivateKeyInfo.java:45)
at com.android.signapk.SignApk.readPrivateKey(SignApk.java:273)
at com.android.signapk.SignApk.main(SignApk.java:1024)

ERROR: signapk.jar failed: return code 1

Makefile:92: recipe for target 'release' failed
make: *** [release] Error 1

Overhauled master to contain everything to one directory and get rid of a lot of the various permissions issues etc we keep seeing, and make it a lot easier to develop on.

You may need to copy over keys and start from scratch though.

Just did end to end build/release for marlin and crosshatch

Got an error from before below. What OS is your docker host?

make DEVICE=marlin keys
Get /home/build/manifests
fatal: '/home/build/manifests' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: '/home/build/manifests' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: cannot obtain manifest /home/build/manifests
Makefile:28: recipe for target 'fetch' failed
make: *** [fetch] Error 1

I tracked down this error and a few others, mostly tied to dirty trees between sweeping changes I have been making.

I cleaned up the "clean" system, and added a "make mrproper" to nuke the world and start fresh (but don't delete keys).

Also everything will now be locally stored in the "$PWD/build" directory.

You will probably have to nuke and build from scratch without some data transplanting, but please give it another go.

I actually tested on three systems this time :-P

Once I get someone else to confirm this builds for them I'll tag and get in the habit of tagging at known safe build points now that I know other people are using this.

Tested again got the following error.

fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). fatal: not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). skipping tools/loganalysis/ skipping tools/metalava/ skipping tools/repohooks/ skipping tools/test/connectivity/ skipping tools/tradefederation/contrib/ skipping tools/tradefederation/core/ skipping vendor/android-prepare-vendor/ Makefile:35: recipe for target 'fetch' failed make: *** [fetch] Error 128

This has been fixed for a while now. If it pops up again please feel free to reopen. Thanks.