ImageBuilder Error, Cannot Interpret

$ make image
...
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... failed.
Checking 'perl-data-dumper'... ok.
Checking 'perl-findbin'... ok.
Checking 'perl-file-copy'... ok.
Checking 'perl-file-compare'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'xargs'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'egrep'... ok.
Checking 'getopt'... ok.
Checking 'realpath'... ok.
Checking 'stat'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'install'... ok.
Checking 'perl'... ok.
Checking 'python2-cleanup'... ok.
Checking 'python'... ok.
Checking 'python3'... ok.
Checking 'python3-distutils'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'rsync'... ok.
Checking 'which'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please build with umask 022 - other values produce broken packages

Prerequisite check failed. Use FORCE=1 to override.
make[2]: *** [Makefile:93: staging_dir/host/.prereq-build] Error 1
make[1]: *** [Makefile:243: image] Error 2
make[1]: Leaving directory '/home/<user>/software/OSes/LEDE/openwrt-imagebuilder-22.03.5-x86-64.Linux-x86_64'
make: *** [Makefile:22: image] Error 2
$ umask
0022

If prereq-build is supposed to tell me what's wrong, I'm not seeing it. I've used imagebuilder several times before. OpenWRT 18 and since, maybe? I don't remember this problem.

I do recognize the warning about umask, though; that's and old issue I've dealt with before. Is it a problem with the recipe recognizing full four-digit output from umask? I ran the check in the recipe, manually, and it seemed to work fine. So, I'm assuming that message is just a warning and not the error prereq-build is tring to tell me about. But, then, what is the actual error?

chmod 755 in yout build folder should fix it

Thanks for the help.

But, what do you mean by build folder? The imageBuilder folder created when extracted the tar ball? The build_dir folder inside that one? The target folder? The 'tmp' folder? Of those, all are already 755, except for the tmp folder, and changing it didn't have any effect.

Besides, since the imageBuilder came in a tar pkg, all the permissions are stored in the package. I don't even thing umask is checked. So, I'm just saying I didn't do anything unusual.

Also, I can't figure out how to set FORCE=1. I think I'm doing it right, but it's not working. I'm staring at make documentation and I'm not seeing what I'm doing wrong. So, I'm really stuck.

Sorry, but I'm still confused.

There were a few other subdirectories that were not 755 in the imagebuilder folder I extracted. I use find to identify and change them. But, it didn't affect the symptoms at all; still fails at host/prereq-build.

Same error?

Yes. Identical.

Well, okay, I guess the last two lines are missing now:

$ make image
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... failed.
Checking 'perl-data-dumper'... ok.
Checking 'perl-findbin'... ok.
Checking 'perl-file-copy'... ok.
Checking 'perl-file-compare'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'xargs'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'egrep'... ok.
Checking 'getopt'... ok.
Checking 'realpath'... ok.
Checking 'stat'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'install'... ok.
Checking 'perl'... ok.
Checking 'python2-cleanup'... ok.
Checking 'python'... ok.
Checking 'python3'... ok.
Checking 'python3-distutils'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'rsync'... ok.
Checking 'which'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please build with umask 022 - other values produce broken packages

Prerequisite check failed. Use FORCE=1 to override.
make[1]: *** [Makefile:93: staging_dir/host/.prereq-build] Error 1
make: *** [Makefile:243: image] Error 2

Ah, that's a red herring. I created a Makefile in the parent directory to help me remember what targets to run. So, that's where the extra line leaving directory... comes from.

So, yes, the output is identical.

In my experience, the errors of this type mostly surface when there is something wrong with the build system user accounts ('root' involved somehow?) and directory permissions/owners (root?).

I usually make sure that already the work directory from which I expand the imagebuilder or full toolchain, is already owned by a non-root account (chown someone) and its permissions are set to 755 wth chmod. And naturally all download and expand and build is done by a non-root account.

Hmm. As I say, I've done this at least four times before, but I don't remember this issue, or at least I figured it out quickly before. I have the main development tools installed, and I use them, so, I likely have utilities that are necessary. I definitely am not using root to do any of this. I don't see what perms as to do with it, but I've set them as you suggest and that still hasn't changed anything.

How do I find out what is the actual problem? Why do all the checks say 'ok'? There must be other checks that are not shown, right?

Oops, I finally see now that it actually says failed for umask.

So, I think my initial suspicion was right: the check is for umask isn't working correctly.

Aha! BASH_ENV was resetting umask. I did solve this problem before...and forgot. Sorry!!!

Thanks for the help.

2 Likes

Maybe mark your post as solution to help others with similar issues

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