Re: Setting default version in Poudriere
- Reply: Pat : "Re: Setting default version in Poudriere"
- In reply to: Pat : "Re: Setting default version in Poudriere"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Jul 2024 21:14:54 UTC
On 2024-07-05 21:40, Pat wrote: > On Friday, July 5th, 2024 at 08:57, Edward Sanford Sutton, III > <mirror176@hotmail.com> wrote: > >> >> >> On 7/4/24 13:57, Pat wrote: >> >> > Hello, >> > >> > Got a couple of rather silly question, but I can't find a definitive >> > answer to either. >> > >> > If I build PostgreSQL15-server, I get version 15.7. That is the latest >> > version, so not unexpected. >> > >> > I would like to build version 15.6. Ideally I would like to have both >> > versions available because for the most part I want to install 15.7, but >> > I need 15.6 at the moment. >> > >> > So my questions are: >> > How do I configure things to have both versions available? >> > If that is not possible, how do I set the default to be 15.6 for now, >> > with the intent of undoing that after my testing? >> >> >> There is only one port for version 15; to use 15.6 you need a copy of >> the ports tree with any git commit from >> 6fa897631d45dd11a5b1fcea5993590f9ccbef48 to before >> ade1c57e3a72ec9c4a7c02ce28dbfbd5efcce373 (probably >> de67baaee9ffaf88fa80dcda1f89d83df424d0a4 but I'm bad at sorting >> through >> git hashes). You could also manually patch the tree to have an older >> copy in place of the newer one. > > Thanks for taking the time to reply, and pinning to a specific commit > is in line with some of the information that I found, in particular > in the FreeBSD forums. But that leads to another question. > > I haven't done a lot with git in some time, but I am familiar with the > basics. I seem to recall that in order to identify a directory as a > git repo there should be a .git directory and a few other git related > items. I do not see any of that in any of the ports directories. For > instance: > > ls /usr/local/poudriere/ports/default/databases/postgresql15-server > total 259 > drwxr-xr-x 3 root wheel 13 May 16 13:07 ./ > drwxr-xr-x 1085 root wheel 1086 Jun 24 20:19 ../ > -rw-r--r-- 1 root wheel 801 May 16 13:07 Makefile > -rw-r--r-- 1 root wheel 187 May 16 13:07 distinfo > drwxr-xr-x 2 root wheel 18 May 16 13:07 files/ > -rw-r--r-- 1 root wheel 1238 Mar 1 11:12 pkg-descr > -rw-r--r-- 1 root wheel 482 Mar 1 11:12 pkg-install-server > -rw-r--r-- 1 root wheel 58816 Mar 1 11:12 pkg-plist-client > -rw-r--r-- 1 root wheel 10763 Mar 1 11:12 pkg-plist-contrib > -rw-r--r-- 1 root wheel 979 Mar 1 11:12 pkg-plist-plperl > -rw-r--r-- 1 root wheel 1389 Mar 1 11:12 pkg-plist-plpython > -rw-r--r-- 1 root wheel 197 Mar 1 11:12 pkg-plist-pltcl > -rw-r--r-- 1 root wheel 89992 May 16 13:07 pkg-plist-server > > Is that the right tree, or should I be looking elsewhere? I'm just > not sure where run the git commands from. If I knew that I might > could figure the rest out from there. > >> With poudriere, you can have multiple ports trees which once created >> you can then select for tasks such as `poudriere bulk -j 14 -p >> outdated databases/postgresql15-server` >> I'm not sure how easily you can have just a directory separate from >> the ports tree for poudriere to use in a port's place but tools such >> as >> ports-mgmt/portdowngrade may simplify the process for downgrading the >> port but I haven't tried it since git. >> If you want both versions available simultaneously from 1 poudriere >> run, I presume you need to add a new unique tree entry that is a copy >> of >> 15.6 under its own named path and add it to databaes's Makefile. If >> you >> are just doing some a/b testing where you want to keep bouncing back >> and >> forth, I'd just have the tree with the old version as a separate ports >> tree and do the poudriere build of it and the updated version as 2 >> separate repos then change which one pkg looks at and (force?) >> installation of packages for each test. > > Yeah, my intent here is to do some simple a/b testing prior to a > production upgrade. I think the easiest option is to just create > two jails, one at the current level, and one at 15.6. I just need to > figure out the pinning part and I'm probably good. > >> >> > Thanks, >> > Pat >> >> I would suggest just creating a port for postgres 15.6 in addition to the 15.7 that's already in the ports tree