#872199 /var/yp/ypservers gets overwritten upon invocation of 'make -B -C /var/yp'

Package:
ypserv
Source:
ypserv
Description:
Server daemon for working with Network Information System (NIS)
Submitter:
Anton Dunaev
Date:
2021-01-24 15:45:10 UTC
Severity:
minor
Tags:
#872199#5
Date:
2017-08-15 07:24:43 UTC
From:
To:
Dear Maintainer,  /var/yp/Makefile has a small drawback which prevents
usage of -B flag of make in configuration with NIS slaves (NOPUSH set
to false).

The problem is that /var/yp/ypservers gets overwritten unconditionally
in such scenario. In my opinion this file should be protected from
changing once it exists.

One possible solution is to replace block
    $(YPSERVERS):
       @echo -n "Generating $*..."
       @uname -n > $(YPSERVERS)
to the following:
    ifeq ($(wildcard $(YPSERVERS)),)
    $(YPSERVERS):
       @echo -n "Generating $*..."
       @uname -n > $(YPSERVERS)
    endif

P.S. This report also belongs to many (if not all) preceeding versions.