[Buildroot] [PATCH] package/nss-myhostname: Add package

Peter Korsgaard peter at korsgaard.com
Fri May 25 17:02:26 UTC 2018

>>>>> "Vincent" == Vincent Prince <vincent.prince.fr at gmail.com> writes:

 > Also fix nss-mdns hook to work with nss-myhostname

 > Signed-off-by: Vincent Prince <vincent.prince.fr at gmail.com>

Thanks for you contribution! Can you please split this in two patches,
E.G. one to change nss-mdns and one to add nss-myhostname?

Also please add an entries to the DEVELOPERS file and run
./utils/check-package on your new files, I see a number of strange
indentation issues.

While you are at it, please also add a sha256 hash for the license file.

 > +
 > +NSS_MYHOSTNAME_SITE = http://0pointer.de/lennart/projects/nss-myhostname

Why? Does the tarball not contain a configure script?

> +
 > +    $(SED) '/^hosts:/s/\s*\<myhostname\>//' \
 > +		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' -r $(TARGET_DIR)/etc/nsswitch.conf
 > +endef

Doesn't nss-myhostname just need to go to the end of the file?
E.G. something like:

     grep -qw myhostname $(TARGET_DIR)/etc/nsswwitch.conf || \
          $(SED) '/\(^hosts:.*\)/\1 myhostname/' $(TARGET_DIR)/etc/nsswitch.conf

Bye, Peter Korsgaard

More information about the buildroot mailing list