'make clean' and 'permssion denied'

I'm building a custom metric module.
Running into some issues:

  • 'make package' is currently failing on me. A rerun causes also causes permission issues:
rm: cannot remove 'build/package/modules.d-darwin/golang_push.yml.disabled': Permission denied                                                                                    
rm: cannot remove 'build/package/homedir/kibana': Permission denied                                                                                                                              
rm: cannot remove 'build/package/homedir/.build_hash.txt': Permission denied           
rm: cannot remove 'build/package/homedir/NOTICE': Permission denied                 
rm: cannot remove 'build/package/modules.d-win/golang_push.yml.disabled': Permission denied
rm: cannot remove 'build/package/modules.d-linux/golang_push.yml.disabled': Permission denied
...
make clean 

runs into same permission issue

I manually cleaned things up to get going again

... obviously something is getting off. It looks I am dealing with some side effects on a failed`make package'
Here is the last output from my make package I hope somebody can give a clue here

SNAPSHOT=no PACKAGES=golang_push/deb TARGETS="darwin/amd64" make package
Compiling golang_push for linux/amd64...
Compiling golang_push for linux/386...
Build process completed
make[1]: Leaving directory '/home/marco/go/src/github.com/sentient/golang_push'
SNAPSHOT=no BUILDID=fabd03c4e98657ac47972b56ce7cd3c342703416  BEAT_PATH=github.com/sentient/golang_push BUILD_DIR=/home/marco/go/src/github.com/sentient/golang_push/build/package UPLOAD_DIR=/home/marco/go/src/github.com/sentient/golang_push/build/upload make -C ./vendor/github.com/elastic/beats/dev-tools/packer golang_push/deb /home/marco/go/src/github.com/sentient/golang_push/build/upload/build_id.txt
make[1]: Entering directory '/home/marco/go/src/github.com/sentient/golang_push/vendor/github.com/elastic/beats/dev-tools/packer'
docker run --rm -v /home/marco/go/src/github.com/sentient/golang_push/build/package:/build tudorg/go-daemon
Fetching go-daemon
Cloning into 'go-daemon'...
Compiling for linux/amd64..
/tmp/ccRRHS2V.o: In function `main':
god.c:(.text+0x2ca): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
god.c:(.text+0x262): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Compiling for linux/i386..
/tmp/ccuNk2L2.o: In function `main':
god.c:(.text+0x2ee): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
god.c:(.text+0x287): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Copying to host..
docker build --rm=true -t tudorg/fpm /home/marco/go/src/github.com/sentient/golang_push/vendor/github.com/elastic/beats/dev-tools/packer/docker/fpm-image
Sending build context to Docker daemon  2.048kB
Step 1/4 : FROM ubuntu:16.04
 ---> b9e15a5d1e1a
Step 2/4 : MAINTAINER Tudor Golubenco <tudor@elastic.co>
 ---> Using cache
 ---> c10635411006
Step 3/4 : RUN     apt-get update &&     apt-get install -y --no-install-recommends         autoconf build-essential libffi-dev ruby-dev rpm zip dos2unix libgmp3-dev
 ---> Using cache
 ---> e127b33be8af
Step 4/4 : RUN gem install fpm -v 1.9.2
 ---> Using cache
 ---> 8fc76ff0eba9
Successfully built 8fc76ff0eba9
Successfully tagged tudorg/fpm:latest
echo Creating DEB packages for golang_push
Creating DEB packages for golang_push
ARCH=386 BEAT=golang_push BUILD_DIR=/home/marco/go/src/github.com/sentient/golang_push/build/package UPLOAD_DIR=/home/marco/go/src/github.com/sentient/golang_push/build/upload BEAT_PATH=/home/marco/go/src/github.com/sentient/golang_push BUILDID=fabd03c4e98657ac47972b56ce7cd3c342703416 SNAPSHOT=no /home/marco/go/src/github.com/sentient/golang_push/vendor/github.com/elastic/beats/dev-tools/packer/platforms/debian/build.sh
{:timestamp=>"2018-11-06T16:47:18.342574+0000", :message=>"Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag", :level=>:warn}
{:timestamp=>"2018-11-06T16:47:21.439817+0000", :message=>"Created package", :path=>"golang-push_6.3.3_i386.deb"}
mv: cannot stat 'golang_push_6.3.3_i386.deb': No such file or directory
Makefile:14: recipe for target 'golang_push/deb' failed
make[1]: *** [golang_push/deb] Error 1
make[1]: Leaving directory '/home/marco/go/src/github.com/sentient/golang_push/vendor/github.com/elastic/beats/dev-tools/packer'
vendor/github.com/elastic/beats/libbeat/scripts/Makefile:476: recipe for target 'package' failed
make: *** [package] Error 2


I think I see what is going on.

my module name golang-push is being renamed to golang_push

... "golang-push_6.3.3_i386.deb"}
mv: cannot stat 'golang_push_6.3.3_i386.deb': No such file or directory

I renamed my module and moved on. No further help needed

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.