clayrisser / docker-openldap

openldap based on bitnami openldap with ppolicy, password hashing and support for ldif migrations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make build does not work

thesefer opened this issue · comments

Running ubuntu

make build

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
chmod: cannot access '/data/home/test/test/docker-openldap/.mkpm/mkpm/.bin/mkpm': No such file or directory
./mkpm: 77: exec: /data/home/test/test/docker-openldap/.mkpm/mkpm/.bin/mkpm: not found
make: *** [Makefile:8: build] Error 127

Which dependencies are missing? GNU tools are installed by default, make is installed, remake is installed

EDIT: After installing https://github.com/clayrisser/mkpm

chmod: cannot access '/data/home/test/test/docker-openldap/.mkpm/mkpm/.bin/mkpm': No such file or directory
./mkpm: 77: exec: /data/home/test/test/docker-openldap/.mkpm/mkpm/.bin/mkpm: not found
make: *** [Makefile:8: build] Error 127

You aren't required to install mkpm since mkpm works with or without the mkpm binary installed.

The above error means you're not using GNU tar. Since it's not GNU tar, it fails to extract the mkpm cache, which is why the .bin/mkpm is not found.

Can you send me the version of tar you are using?

tar --version

Should give a similar output (could be a different version which is ok).

tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

If you're on OSX you can install GNU tar with the following command.

brew install gnu-tar

The reason mkpm requires gnu tar is because it supports a feature that prevents the tar file from changing the timestamp. This is necessary to prevent the mkpm cache from thinking it's a new cache file when it has the exact same files.

I could implement a fallback to other tar versions (which I might do), but it would make the cache.tar.gz think it's a new file sometimes, when nothing has actually changed, which could pollute the git lfs.

I might still do this for the convenience of those who don't have gnu-tar, but for now make sure gnu-tar is installed.

Thanks for your reply. I am on Linux not OSX. Here is my tar version, identical to yours in this case

tar --version
tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason

EDIT: Above was from Ubuntu22. Sorry. Here is the Ubuntu20 machine where I tried it

tar (GNU tar) 1.30
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Oh, I bet you never enabled git lfs.

Can you cat the .mkpm/cache.tar.gz? If it's showing a git lfs pointer instead of binary data, then you probably didn't enable git lfs.

You can setup git lfs on debian/ubuntu with the following commands.

sudo apt install -y git-lfs
git lfs install

Then either re-clone the project or run the following command to lookup the lfs files.

git lfs fetch --all

git lfs is installed but I indeed did not enable it because I didn't expect to (it is nowhere mentioned). You should mention it in the readme because I didn't check every folder and simply cloned it. It is a prerequisite to build it.

93aaaf3d2dbdad0ef89a10357290e7c0a3f7bffd18f9143609d4e864c61bfb3e .mkpm/cache.tar.gz

Now it just comes down to docker compose v1/v2 issues (v2 installed)

make build
/bin/sh: 1: docker-compose: not found
make[1]: *** [/data/home/test/test/docker-openldap/.mkpm/mkpm/.pkgs/docker/main.mk:177: build] Error 127
make: *** [Makefile:8: build] Error 2

Change export DOCKER_COMPOSE := docker-compose to export DOCKER_COMPOSE := docker compose in Mkpmfile

Yes, sorry about that. I will update the README.md to include that.

I will also fix the docker compose issue.

For now, you could alias it.

alias docker-compose="docker compose"