problems installing in non-std location

2006-12-14
2012-11-28
  • The misc/Makefile.in seems broken when installing e2fsprogs in a
    non-standard location (when configure is called with --prefix=).
    It claims that /etc/mke2fs.conf is not writable (which it obviously
    isn't).

    Thanks and Cheers,
      Mario

    This patch to misc/Makefile.in fixes the issue:

    -- cut -----------------------------------------------------------------
    --- misc/Makefile.in    2006-12-14 22:32:29.000000000 +0100
    +++ misc/Makefile.in.new        2006-12-14 22:30:31.000000000 +0100
    @@ -230,12 +230,12 @@
            @$(SUBSTITUTE_UPTIME) $(srcdir)/filefrag.8.in filefrag.8

    installdirs:
    -       @echo " MKINSTALLDIRS $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(libdir)"
    +       @echo " MKINSTALLDIRS $(sbindir) $(root_sbindir) $(bindir) $(man1dir) $(man8dir) $(man5dir) $(libdir) $(root_sysconfdir)"
            @$(MKINSTALLDIRS) $(DESTDIR)$(sbindir) \                 $(DESTDIR)$(root_sbindir) $(DESTDIR)$(bindir) \                 $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) \ -               $(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) \ -               $(DESTDIR)$(libdir) $(DESTDIR)/etc
    +               $(DESTDIR)$(man5dir) $(DESTDIR)$(libdir) \ +               $(DESTDIR)$(root_sysconfdir)

    install: all $(SMANPAGES) $(UMANPAGES) installdirs
            @for i in $(SPROGS); do \ @@ -343,8 +343,8 @@
            for i in $(FMANPAGES); do \                 $(RM) -f $(DESTDIR)$(man5dir)/$$i; \         done
    -       if cmp -s $(srcdir)/mke2fs.conf $(DESTDIR)/etc/mke2fs.conf; then \ -               $(RM) $(DESTDIR)/etc/mke2fs.conf; \ +       if cmp -s $(srcdir)/mke2fs.conf $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; then \ +               $(RM) $(DESTDIR)$(root_sysconfdir)/mke2fs.conf; \         fi

    clean:
    -- cut -----------------------------------------------------------------

     
    • Is that really enough? It looks like the path "/etc/mke2fs.conf" is hardcoded in misc/mke2fs.c.