aboutsummaryrefslogtreecommitdiffstats
path: root/go
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2020-07-05 10:20:17 -0700
committerAndrew G. Morgan <morgan@kernel.org>2020-07-05 10:20:17 -0700
commit5457efd92c533259eecde426d9e6bb6abb270d89 (patch)
treef33cdf736c39f5ad610d4a321e8a66fefbfcb15a /go
parent264f8dcb14d811b7b1a0a9abbe82a946cff3d955 (diff)
downloadplatform_external_libcap-5457efd92c533259eecde426d9e6bb6abb270d89.tar.gz
platform_external_libcap-5457efd92c533259eecde426d9e6bb6abb270d89.tar.bz2
platform_external_libcap-5457efd92c533259eecde426d9e6bb6abb270d89.zip
Fix capability list generation and legacy go package install.
Fixes Hussam Al-Tayeb bug report: https://bugzilla.kernel.org/show_bug.cgi?id=208439 The list generation has been intended to be fully self-defined since 2.23, but I didn't complete the job back then because of a lack of a way to runtime-determine the capabilities actually supported by the running kernel. This last bit was fixed with 2.30 and I should have caught the need for this final clean up then. The go install was broken in 2.37 as a oversight as I refactored to support go modules. I did a write up about how this Go support is expected to work here: https://sites.google.com/site/fullycapable/building-go-programs-that-manipulate-capabilities Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'go')
-rw-r--r--go/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/go/Makefile b/go/Makefile
index c2864ab..1e4cea2 100644
--- a/go/Makefile
+++ b/go/Makefile
@@ -86,12 +86,13 @@ ifeq ($(CGO_REQUIRED),0)
endif
install: all
- mkdir -p $(FAKEROOT)$(GOPKGDIR)/libcap/psx
- rm -f $(FAKEROOT)$(GOPKGDIR)/libcap/psx/*
- install -m 0644 src/libcap/psx/* $(FAKEROOT)$(GOPKGDIR)/libcap/psx/
- mkdir -p $(FAKEROOT)$(GOPKGDIR)/libcap/cap
- rm -f $(FAKEROOT)$(GOPKGDIR)/libcap/cap/*
- install -m 0644 src/libcap/cap/* $(FAKEROOT)$(GOPKGDIR)/libcap/cap/
+ rm -rf $(FAKEROOT)$(GOPKGDIR)/$(IMPORTDIR)/psx
+ mkdir -p $(FAKEROOT)$(GOPKGDIR)/$(IMPORTDIR)/psx/include/sys
+ for x in src/$(IMPORTDIR)/psx/* ; do if [ -d $$x ]; then continue; fi; install -m 0644 $$x $(FAKEROOT)$(GOPKGDIR)/$(IMPORTDIR)/psx; done
+ install -m 0644 src/$(IMPORTDIR)/psx/include/sys/psx_syscall.h $(FAKEROOT)$(GOPKGDIR)/$(IMPORTDIR)/psx/include/sys/psx_syscall.h
+ mkdir -p $(FAKEROOT)$(GOPKGDIR)/$(IMPORTDIR)/cap
+ rm -rf $(FAKEROOT)$(GOPKGDIR)/$(IMPORTDIR)/cap/*
+ install -m 0644 src/$(IMPORTDIR)/cap/* $(FAKEROOT)$(GOPKGDIR)/$(IMPORTDIR)/cap
clean:
rm -f *.o *.so *~ mknames web ok good-names.go