Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSTALLING with DESTDIR variable set #55

Closed
suedi opened this issue Aug 29, 2015 · 2 comments
Closed

INSTALLING with DESTDIR variable set #55

suedi opened this issue Aug 29, 2015 · 2 comments

Comments

@suedi
Copy link
Contributor

suedi commented Aug 29, 2015

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
Copy link
Owner

Hi @suedi

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

@suedi
Copy link
Contributor Author

suedi commented Sep 5, 2015

Tested with latest build == works!

closing...

@suedi suedi closed this as completed Sep 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants