droe / sslsplit

Transparent SSL/TLS interception
https://www.roe.ch/SSLsplit
BSD 2-Clause "Simplified" License
1.75k stars 328 forks source link

Unify test and mkdir target #255

Closed arkamar closed 5 years ago

arkamar commented 5 years ago

This change prefers TARGET variable over the hardcoded name.

However, I am not sure why we need to create empty /usr/local/sslsplit directory in the filesystem. I believe that we should remove lines

    test -d $(DESTDIR)$(PREFIX)/$(TARGET) || \
            $(MKDIR) -p $(DESTDIR)$(PREFIX)/sslsplit

with similar reason like in #251, distributions should create it in theirs preferred location.

droe commented 5 years ago

Your fix is certainly correct and will be applied. I'll look into the suggestion for removing it entirely later today, at first thought the suggestion seems sound.

arkamar commented 5 years ago

I just realized that we install sslsplit.conf.sample there. Anyway, it violates FHS/Gentoo policy and I have to change the location to something else. I use /usr/share/doc/sslsplit-${VERSION} currently, but $(DESTDIR)etc sounds also reasonable to me.

droe commented 5 years ago

After looking into this, I think the default should be creating a directory $(DESTDIR)$(PREFIX)/etc/sslsplit and putting the sample config there, matching the paths contained in the sample config. I'd further suggest to introduce a variable allowing you to override the default config directory for easy overriding.

arkamar commented 5 years ago

Thanks.