jcnelson / vdev

A device-file manager for *nix
GNU General Public License v3.0
101 stars 13 forks source link

INSTALLING with DESTDIR variable set #55

Closed suedi closed 8 years ago

suedi commented 8 years ago

When I install with DESTDIR="/tmp/vdev-20150829"

I get in in etc/vdev/vdevd.config

acls=/tmp/vdev-20150829/etc/vdev/acls
actions=/tmp/vdev-20150829/etc/vdev/actions
ifnames=/tmp/vdev-20150829/etc/vdev/ifnames.conf

in vdev/example/Makefile

all: $(VDEV_CONFIG_BUILD)
$(CONF_BUILD): vdevd.conf.in
    @mkdir -p $(shell dirname "$@")
    @cat $< | \
        sed -e 's~@PREFIX@~$(PREFIX)~g;' | \
        sed -e 's~@CONF_DIR@~$(INSTALL_VDEV_CONFIG)~g;' > $@

Relevant for this is CONF_DIR gets substituted with INSTALL_VDEV_CONFIG in vdvevd.conf

in buildconf.mk

ETCDIR  ?= $(DESTDIR)$(PREFIX)/etc
...
INSTALL_VDEV_CONFIG := $(ETCDIR)/vdev

For me there is two problems

  1. I use PREFIX="/usr" (cause I want binaries in /usr/bin/) and that gives ETCDIR to something like /usr/etc/.... that doesn't look sane but I usually just delete the PREFIX part in ETCDIR ?= $(DESTDIR)$(PREFIX)/etc to fix it for me
  2. INSTALL_VDEV_CONFIG uses ETCDIR which uses DESTDIR so DESTDIR gets prepended in vdevd.conf

    For me I could just INSTALL_VDEV_CONFIG := /etc/vdev

Maybe the answer is just that I should keep my own buildconf.mak and it doesn't affect other users i.e. on devuan/debian

Thanks for good work

best regards

Scooby

jcnelson commented 8 years ago

Hi @suedi

Thank you for bringing this to my attention. I just finished working through the same problem with DESTDIR in issue #40. Commit fe770f7616f315940b3802ed142c65ad56362f99 should have fixed it, but please let me know if it happens again :)

suedi commented 8 years ago

Tested with latest build == works!

closing...