Menu

#10 3.2 Incorrect locations after "make install"

v1.0_(example)
closed
bofh28
None
5
2013-12-27
2012-02-01
Jari Aalto
No

The "make -n install" reports locations that would be invalid for real install. The FHS does not know /pentest root directory. Please install the files in standard locations known to FHS http://www.pathname.com/fhs/.

That is:

  • binaries: /usr/bin
  • manual pages: /usr/share/man/man1
  • documentation /usr/share/doc/<package>/</package>

Also

  • You may want to check Makefile for those double slashes
  • Do not add "-g and -o" options as admin may have other ideas. Just add "install $(INSTALL_OPTIONS) in case those are occasionally needed..

make -n install output

echo "Building binary..."
/usr/bin/gcc -Wall -lm -pthread -std=c99 crunch.c -o crunch
echo ""
echo "Creating directories..."
/usr/bin/install -d -m 755 -o root -g root /pentest/passwords//crunch
/usr/bin/install -d -m 755 -o root -g root /usr/local/share/man/man1
echo "Copying binary..."
/usr/bin/install crunch -m 755 -o root -g root /pentest/passwords//crunch
echo "Copying charset.lst..."
/usr/bin/install charset.lst -m 644 -o root -g root /pentest/passwords//crunch
echo "Copying GPL.TXT..."
/usr/bin/install GPL.TXT -m 644 -o root -g root /pentest/passwords//crunch
echo "Installing man page..."
/usr/bin/install crunch.1 -m 644 -o root -g root /usr/local/share/man/man1
echo ""

Discussion

  • bofh28

    bofh28 - 2012-02-02

    The program is written with the intention of use in the BackTrack Linux distribution. /pentest/passwords/crunch is the path for that distribution. I could add a BT specific option and put all of the BT specific things there. i.e. make would be /usr/bin
    make bt would be /pentest/passwords

    I will change the path for the man page.
    I don't have documentation so no need for that.
    I did add a $(INSTALL_OPTIONS) variable and I set it to -g root -o root
    I am sorry but I don't understand what you mean by double slashes. Can you please clarify?

     
  • Jari Aalto

    Jari Aalto - 2012-02-02

    I don't understand what you mean by double slashes

    See the output:

     root /pentest/passwords//crunch
                            ==
    

    This is some small glitch in the way variables are used in Makefile, so the output does look "clean". Yes, the Linux would convert "//" into plain "/", but still it would be much better if this would be taken cared of.

    The problem is with the variables. See:

    PREFIX      = /pentest/passwords/
    

    It is better to not add trailing slashes. Usually the PREFIX is named DESTDIR in makefiles.

    I'm attaching my Makefile template that should give you ideas what are the most common variables used in Makefiles. See attachment, You can use it as you want as it's GPL.

    Thank you for the changes.

     

    Last edit: Jari Aalto 2013-05-30
  • Jari Aalto

    Jari Aalto - 2012-02-02

    Makefile template

     
  • bofh28

    bofh28 - 2012-02-03

    updated Makefile

     
  • bofh28

    bofh28 - 2012-02-03

    Here is an updated Makefile. I think it addresses all of your issues.

     
  • Jari Aalto

    Jari Aalto - 2012-10-27

    The 3.4 "geninstall" needs still a little work to be correct (e.g. *.lst does not belong to /usr/bin etc). The FSF address also is preferably referred via URL. See corrected Makefile in attachment.

     
  • Jari Aalto

    Jari Aalto - 2012-10-28

    Please forget the above attached file and use Git to receive the latest updates. The instructions are in message https://sourceforge.net/p/crunch-wordlist/bugs/16/

     
  • bofh28

    bofh28 - 2013-12-27

    The last two versions should have fixed this issue. Please reopen if the issue still exists.

     
  • bofh28

    bofh28 - 2013-12-27
    • status: open --> closed
    • Group: --> v1.0_(example)
     

Log in to post a comment.

MongoDB Logo MongoDB