Refactored the psx package to build as a Go module.
Cleaned up the Go module redirection html file, now installed
at:
https://kernel.org/pub/linux/libs/security/libcap/
Note, I've moved the C source for libpsx.a into the psx/
directory, but the libpsx.a file is still built in the libcap
subdirectory as before. I also symlinked the C include files from
the psx/ directory. This made the source compile in conjuction
with the "psx" Go package automatically. It also substantially
simplified the go/Makefile.
I feel pretty good about this next version from the perspective
of a viable "psx" build. Caveat the need for CGO_LDFLAGS_ALLOW
on the command line pre-go1.15. Hopefully, the psx package comment
is enough for folk to figure that detail out.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
diff --git a/Makefile b/Makefile
index ce51504..cc37029 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@
endif
ifeq ($(GOLANG),yes)
$(MAKE) -C go $@
+ rm -f cap/go.sum
endif
$(MAKE) -C tests $@
$(MAKE) -C progs $@
@@ -30,6 +31,8 @@
distclean: clean
$(DISTCLEAN)
+ @echo "CONFIRM Go package cap has right version dependency on psx:"
+ grep -F "require kernel.org/pub/linux/libs/security/libcap/psx v$(GOMAJOR).$(VERSION).$(MINOR)" cap/go.mod
release: distclean
cd .. && ln -s libcap libcap-$(VERSION).$(MINOR) && tar cvf libcap-$(VERSION).$(MINOR).tar --exclude patches libcap-$(VERSION).$(MINOR)/* && rm libcap-$(VERSION).$(MINOR)