Last active
August 31, 2019 19:25
-
-
Save lrvick/8b49f8b40955387bfb7d45da9912e3ba to your computer and use it in GitHub Desktop.
y u no write
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat Dockerfile | |
FROM ubuntu:cosmic | |
ENV HOME=/home/build | |
ARG UID=1000 | |
ARG GID=50 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && \ | |
apt-get install -y \ | |
git \ | |
strace \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | |
&& useradd -G plugdev,sudo -g $GID -u $UID -ms /bin/bash build | |
ENTRYPOINT ["/usr/bin/bash"] | |
USER build | |
WORKDIR /home/build | |
$ eval $(docker-machine env aosp-build) | |
$ docker-machine ssh aosp-build "id" | |
uid=1000(docker) gid=50(staff) groups=50(staff),100(docker) | |
$ docker run --rm -it -h 'android' -v /home/lrvick/Sources/hashbang/aosp-build/config:/home/build/config -u 1000:50 hashbang/aosp-build:latest bash | |
build@android:~$ cd config/manifests | |
build@android:~/config/manifests$ ls -lah | |
total 132K | |
drwxr-xr-x 1 build staff 64 Aug 31 10:24 . | |
drwxr-xr-x 1 build staff 38 Aug 31 18:15 .. | |
drwxr-xr-x 1 build staff 98 Aug 31 18:57 .git | |
-rw-r--r-- 1 build staff 127K Aug 31 06:06 base.xml | |
-rw-r--r-- 1 build staff 2.4K Aug 18 06:06 kernel-bluecross.xml | |
build@android:~/config/manifests$ id | |
uid=1000(build) gid=50(staff) groups=50(staff) | |
build@android:~/config/manifests$ git add . | |
error: insufficient permission for adding an object to repository database .git/objects | |
error: base.xml: failed to insert into database | |
error: unable to index file base.xml | |
fatal: adding files failed | |
build@android:~/config/manifests$ strace git add . | |
execve("/usr/bin/git", ["git", "add", "."], 0x7ffd37f37100 /* 11 vars */) = 0 | |
brk(NULL) = 0x56001e427000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=75691, ...}) = 0 | |
mmap(NULL, 75691, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0fa752c000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3 | |
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p!\0\0\0\0\0\0"..., 832) = 832 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=468944, ...}) = 0 | |
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0fa752a000 | |
mmap(NULL, 471304, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0fa74b6000 | |
mmap(0x7f0fa74b8000, 335872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f0fa74b8000 | |
mmap(0x7f0fa750a000, 122880, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54000) = 0x7f0fa750a000 | |
mmap(0x7f0fa7528000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x71000) = 0x7f0fa7528000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3 | |
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\37\0\0\0\0\0\0"..., 832) = 832 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=116960, ...}) = 0 | |
mmap(NULL, 2212016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0fa7299000 | |
mprotect(0x7f0fa72b5000, 2093056, PROT_NONE) = 0 | |
mmap(0x7f0fa74b4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7f0fa74b4000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 | |
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`l\0\0\0\0\0\0"..., 832) = 832 | |
fstat(3, {st_mode=S_IFREG|0755, st_size=149696, ...}) = 0 | |
mmap(NULL, 132288, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0fa7278000 | |
mmap(0x7f0fa727e000, 61440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f0fa727e000 | |
mmap(0x7f0fa728d000, 24576, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f0fa728d000 | |
mmap(0x7f0fa7293000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7f0fa7293000 | |
mmap(0x7f0fa7295000, 13504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0fa7295000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3 | |
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260#\0\0\0\0\0\0"..., 832) = 832 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=35776, ...}) = 0 | |
mmap(NULL, 39904, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0fa726e000 | |
mmap(0x7f0fa7270000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f0fa7270000 | |
mmap(0x7f0fa7274000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f0fa7274000 | |
mmap(0x7f0fa7276000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f0fa7276000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 | |
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260A\2\0\0\0\0\0"..., 832) = 832 | |
fstat(3, {st_mode=S_IFREG|0755, st_size=1996592, ...}) = 0 | |
mmap(NULL, 2004992, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0fa7084000 | |
mprotect(0x7f0fa70a6000, 1826816, PROT_NONE) = 0 | |
mmap(0x7f0fa70a6000, 1511424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f0fa70a6000 | |
mmap(0x7f0fa7217000, 311296, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x193000) = 0x7f0fa7217000 | |
mmap(0x7f0fa7264000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1df000) = 0x7f0fa7264000 | |
mmap(0x7f0fa726a000, 14336, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0fa726a000 | |
close(3) = 0 | |
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0fa7082000 | |
arch_prctl(ARCH_SET_FS, 0x7f0fa7083280) = 0 | |
mprotect(0x7f0fa7264000, 16384, PROT_READ) = 0 | |
mprotect(0x7f0fa7293000, 4096, PROT_READ) = 0 | |
mprotect(0x7f0fa7276000, 4096, PROT_READ) = 0 | |
mprotect(0x7f0fa74b4000, 4096, PROT_READ) = 0 | |
mprotect(0x7f0fa7528000, 4096, PROT_READ) = 0 | |
mprotect(0x56001e368000, 16384, PROT_READ) = 0 | |
mprotect(0x7f0fa7568000, 4096, PROT_READ) = 0 | |
munmap(0x7f0fa752c000, 75691) = 0 | |
set_tid_address(0x7f0fa7083550) = 30 | |
set_robust_list(0x7f0fa7083560, 24) = 0 | |
rt_sigaction(SIGRTMIN, {sa_handler=0x7f0fa727e6c0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f0fa728add0}, NULL, 8) = 0 | |
rt_sigaction(SIGRT_1, {sa_handler=0x7f0fa727e750, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f0fa728add0}, NULL, 8) = 0 | |
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 | |
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 | |
openat(AT_FDCWD, "/dev/null", O_RDWR) = 3 | |
close(3) = 0 | |
brk(NULL) = 0x56001e427000 | |
brk(0x56001e448000) = 0x56001e448000 | |
stat("/usr/share/locale", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 | |
rt_sigprocmask(SIG_UNBLOCK, [PIPE], NULL, 8) = 0 | |
rt_sigaction(SIGPIPE, {sa_handler=SIG_DFL, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f0fa70c5100}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 | |
getcwd("/home/build/config/manifests", 129) = 29 | |
stat("/home/build/config/manifests", {st_mode=S_IFDIR|0755, st_size=64, ...}) = 0 | |
stat("/home/build/config/manifests/.git", {st_mode=S_IFDIR|0755, st_size=98, ...}) = 0 | |
lstat("/home/build/config/manifests/.git/HEAD", {st_mode=S_IFREG|0644, st_size=23, ...}) = 0 | |
openat(AT_FDCWD, "/home/build/config/manifests/.git/HEAD", O_RDONLY) = 3 | |
read(3, "ref: refs/heads/master\n", 255) = 23 | |
read(3, "", 232) = 0 | |
close(3) = 0 | |
lstat("/home/build/config/manifests/.git/commondir", 0x7ffef3c7fea0) = -1 ENOENT (No such file or directory) | |
access("/home/build/config/manifests/.git/objects", X_OK) = 0 | |
access("/home/build/config/manifests/.git/refs", X_OK) = 0 | |
lstat(".git/commondir", 0x7ffef3c7ffb0) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, ".git/config", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0 | |
read(3, "[core]\n\trepositoryformatversion "..., 8192) = 92 | |
read(3, "", 8192) = 0 | |
close(3) = 0 | |
getcwd("/home/build/config/manifests", 129) = 29 | |
stat(".git", {st_mode=S_IFDIR|0755, st_size=98, ...}) = 0 | |
lstat(".git/commondir", 0x7ffef3c7ff30) = -1 ENOENT (No such file or directory) | |
access("/etc/gitconfig", R_OK) = 0 | |
openat(AT_FDCWD, "/etc/gitconfig", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=94, ...}) = 0 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=94, ...}) = 0 | |
read(3, "[color]\nui = auto\n[user]\nemail ="..., 4096) = 94 | |
read(3, "", 4096) = 0 | |
close(3) = 0 | |
access("/home/build/.config/git/config", R_OK) = -1 ENOENT (No such file or directory) | |
access("/home/build/.gitconfig", R_OK) = -1 ENOENT (No such file or directory) | |
access(".git/config", R_OK) = 0 | |
openat(AT_FDCWD, ".git/config", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0 | |
read(3, "[core]\n\trepositoryformatversion "..., 8192) = 92 | |
read(3, "", 8192) = 0 | |
close(3) = 0 | |
getcwd("/home/build/config/manifests", 129) = 29 | |
chdir("/home/build/config/manifests") = 0 | |
access("/etc/gitconfig", R_OK) = 0 | |
openat(AT_FDCWD, "/etc/gitconfig", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=94, ...}) = 0 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=94, ...}) = 0 | |
read(3, "[color]\nui = auto\n[user]\nemail ="..., 4096) = 94 | |
read(3, "", 4096) = 0 | |
close(3) = 0 | |
access("/home/build/.config/git/config", R_OK) = -1 ENOENT (No such file or directory) | |
access("/home/build/.gitconfig", R_OK) = -1 ENOENT (No such file or directory) | |
access(".git/config", R_OK) = 0 | |
openat(AT_FDCWD, ".git/config", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0 | |
read(3, "[core]\n\trepositoryformatversion "..., 8192) = 92 | |
read(3, "", 8192) = 0 | |
close(3) = 0 | |
readlink(".git/index", 0x56001e4291b0, 32) = -1 ENOENT (No such file or directory) | |
getcwd("/home/build/config/manifests", 129) = 29 | |
openat(AT_FDCWD, "/home/build/config/manifests/.git/index.lock", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = 3 | |
rt_sigaction(SIGINT, {sa_handler=0x56001e2a3910, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f0fa70c5100}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 | |
rt_sigaction(SIGHUP, {sa_handler=0x56001e2a3910, sa_mask=[HUP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f0fa70c5100}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 | |
rt_sigaction(SIGTERM, {sa_handler=0x56001e2a3910, sa_mask=[TERM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f0fa70c5100}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 | |
rt_sigaction(SIGQUIT, {sa_handler=0x56001e2a3910, sa_mask=[QUIT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f0fa70c5100}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 | |
rt_sigaction(SIGPIPE, {sa_handler=0x56001e2a3910, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f0fa70c5100}, {sa_handler=SIG_DFL, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f0fa70c5100}, 8) = 0 | |
getpid() = 30 | |
openat(AT_FDCWD, ".git/index", O_RDONLY) = -1 ENOENT (No such file or directory) | |
access("/home/build/.config/git/ignore", R_OK) = -1 ENOENT (No such file or directory) | |
access(".git/info/exclude", R_OK) = 0 | |
openat(AT_FDCWD, ".git/info/exclude", O_RDONLY) = 4 | |
fstat(4, {st_mode=S_IFREG|0644, st_size=240, ...}) = 0 | |
read(4, "# git ls-files --others --exclud"..., 240) = 240 | |
close(4) = 0 | |
openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4 | |
fstat(4, {st_mode=S_IFDIR|0755, st_size=64, ...}) = 0 | |
getdents64(4, /* 5 entries */, 32768) = 144 | |
openat(AT_FDCWD, ".gitignore", O_RDONLY) = -1 ENOENT (No such file or directory) | |
getdents64(4, /* 0 entries */, 32768) = 0 | |
close(4) = 0 | |
lstat("base.xml", {st_mode=S_IFREG|0644, st_size=129528, ...}) = 0 | |
mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0fa6f81000 | |
openat(AT_FDCWD, "base.xml", O_RDONLY) = 4 | |
openat(AT_FDCWD, "/etc/gitattributes", O_RDONLY) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/home/build/.config/git/attributes", O_RDONLY) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, ".gitattributes", O_RDONLY) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, ".git/info/attributes", O_RDONLY) = -1 ENOENT (No such file or directory) | |
mmap(NULL, 129528, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f0fa6f61000 | |
openat(AT_FDCWD, ".git/objects/pack", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5 | |
fstat(5, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 | |
getdents64(5, /* 2 entries */, 32768) = 48 | |
getdents64(5, /* 0 entries */, 32768) = 0 | |
close(5) = 0 | |
openat(AT_FDCWD, ".git/objects/info/alternates", O_RDONLY) = -1 ENOENT (No such file or directory) | |
access(".git/objects/50/2021d2de07c8d01fe7252e8da5ae2e44f7b7b3", F_OK) = -1 ENOENT (No such file or directory) | |
getpid() = 30 | |
openat(AT_FDCWD, ".git/objects/50/tmp_obj_gvKEC5", O_RDWR|O_CREAT|O_EXCL, 0444) = -1 EACCES (Permission denied) | |
write(2, "error: insufficient permission f"..., 88error: insufficient permission for adding an object to repository database .git/objects | |
) = 88 | |
munmap(0x7f0fa6f61000, 129528) = 0 | |
close(4) = 0 | |
write(2, "error: base.xml: failed to inser"..., 48error: base.xml: failed to insert into database | |
) = 48 | |
write(2, "error: unable to index file base"..., 37error: unable to index file base.xml | |
) = 37 | |
write(2, "fatal: adding files failed\n", 27fatal: adding files failed | |
) = 27 | |
getpid() = 30 | |
close(3) = 0 | |
unlink("/home/build/config/manifests/.git/index.lock") = 0 | |
exit_group(128) = ? | |
+++ exited with 128 +++ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment