1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I install a specific version using ports

Discussion in 'Installation and Maintenance of Ports or Packages' started by osax, Feb 22, 2010.

  1. osax

    osax New Member

    Messages:
    7
    Likes Received:
    0
    How do I install a specific version using ports?
     
  2. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,673
    Likes Received:
    26
    That depends on whether the specific version is in the current ports tree or not.
     
  3. sverreh

    sverreh New Member

    Messages:
    124
    Likes Received:
    0
    If you don't want the latest version from ports, try portdowngrade. It is in ports:

    /usr/ports/ports-mgmt/portdowngrade

    This program will present a list of older versions of the port you specify, and you can select the version you prefer.
     
  4. achix

    achix New Member

    Messages:
    241
    Likes Received:
    0
    Just edit the Makefile and maybe adjust distinfo. You might consider dealing with the various patches in files as well. In the end you might make a port of your own, or just download and compile the source by your own. (like in the old linux days, download, ./configure, make, make install)
     
  5. osax

    osax New Member

    Messages:
    7
    Likes Received:
    0
    Ye old fasion way...

    Compiling from source is a good idea,


    I'm trying to setup puppet, but puppet only supports
    pkg but without version-ing.

    Puppet works great on RPM & Deb system, but is proving more
    difficult on freebsd.

    Any puppet guru's around here, that would like to shed some light
    on the subject?
     
  6. jb_fvwm2

    jb_fvwm2 Member

    Messages:
    1,581
    Likes Received:
    1
    If you are referring to some "--versioning" type
    parameter not supported by a port, *once* (this
    is vague, maybe incorrect, but I think it is in
    another post...
    the general idea:
    Code:
    make extract
    make patch
    cd work
    touch .configure_done.puppet.usr_local
    cd puppet-[number]
    sh ./configure --help
    #write them all down
    sh ./configure --this --that # etc per Makefile etc
    cd /usr/ports/[somewhere]/puppet
    make build
    cd work/src #or...
    ldd ./puppet #if applicable
    # tests okay?
    cd /usr/ports/[somewhere]/puppet
    make install
    
    Retyped from another thread I made in
    "installing... " section. Typos or
    errors or not-applicable maybe...
     
  7. osax

    osax New Member

    Messages:
    7
    Likes Received:
    0
    Not exactly what I had in mind.

    Puppet is running fine & have no problem getting it working.

    I want to tell puppet to install apache-2.2.1 for example, but the ports tree only holds apache-2.2.14

    Pkg won't work, because, well I guess we all know pkg sucks.
     
  8. sverreh

    sverreh New Member

    Messages:
    124
    Likes Received:
    0
    Did you try portdowngrade? I think you can then easily downgrade from apache-2.2.14 to any older version you like.
     
  9. achix

    achix New Member

    Messages:
    241
    Likes Received:
    0
    In that case, you should hack Puppet to go and look for the Makefile in question all the past CVS (or SVN) entries to see in which version/date/tag does the particular requested version (e.g. 2.2.1 in the above example) exist in.
    E.g. take a look at http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/apache22/Makefile
    (in your case you will be using e.g. CVS protocol inside of Puppet)
    you see that the Makefile that comes close to what you want (there is no 2.2.1 port) is:
    http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/apache22/Makefile?rev=1.192;content-type=text/plain
    You then grab the date "Wed May 10 19:47:15 2006 UTC" and you do a CVS update or checkout according to this date.
    This logic will make your Puppet travel back in time when apache-2.2.2 was just released.

    PS
    What do you mean pkg sucks?