Downgrading: using git-checkout(1) and poudriere-bulk(8) to package an inferior version of a port – without downgrading the entire ports tree reddit / freebsd ---------------------------------------------------------------------- grahamperrin · 2022-01-16 11:24 Essentially, with [graphics/drm-devel- kmod](https://www.freshports.org/graphics/drm-devel-kmod/) as an example: 1. `git -C /usr/local/poudriere/ports/default checkout 61b661339366b6ee95ca1de0667979da9240c6b8 graphics/drm-devel-kmod` 2. `poudriere bulk -j main -b latest graphics/drm-devel-kmod` If you'd like to know more about the example, please see either: * the linked PDF (two pages, landscape); or * the longer [HTML archive](https://web.archive.org/web/20220116033214 /https://forums.freebsd.org/threads/downgrading-using-git- checkout-1-and-poudriere-bulk-8-to-package-an-inferior-version-of-a- port.83709/#post-55103). In the HTML archive: * the spoiler can be revealed * you may ignore the responses – post 3 confused things by ignoring three key points. ### Key points * a port – one port – a single port directory * leaving everything else * **not** the whole ports tree * Git, not Subversion * [ports-mgmt/poudriere-devel](https://www.freshports.org/ports- mgmt/poudriere-devel/) [Not the whole ports tree …](https://i.imgur.com/yisWVcS.png) ---------------------------------------------------------------------- thindil · 2022-01-17 06:50 Another option is to use [portdowngrade](https://www.freshports.org/ports-mgmt/portdowngrade/) script: * Supports Subversion history of the port and by date. * Doesn't modify the ports' collection, but creates a new directory with the selected port's revision. This can be an advantage or a disadvantage. * Allows to downgrade also the port's dependencies if needed. * Can list available versions of the port. An example with [graphics/drm-devel- kmod](https://www.freshports.org/graphics/drm-devel-kmod/) could look that: 1. `portdowngrade graphics/drm-devel-kmod r34553425` 2. `poudriere bulk -j main -b latest graphics/drm-devel-kmod` ---------------------------------------------------------------------- grahamperrin · 2022-01-17 07:36 Thanks, I omitted one of the key points that was in my original post to FreeBSD Forums: * **Git** >> **Can something other than Git be used?** >> >> Yes, but FreeBSD has shifted away from svn. >> >> This topic is about Git commands, and poudriere. Sorry about that. They're now amongst the key points above. ----- No mention of Git in any log message for portdowngrade: Chris Rees is a respected committer, someone might like to make (via the bug icon at ) a bug report for portdowngrade to gain compatibility. ---------------------------------------------------------------------- thindil · 2022-01-17 08:21 Ah, thank you for the clarification, my bad. The forum doesn't work for me now. Yes, `portdowngrade` supports only Subversion. We will see, maybe if I have been some free time I could try to write it. :) But not too soon (TM). ---------------------------------------------------------------------- mirror176 · 2022-01-19 19:48 What happens on the next ports tree update? do you need to redowngrade this port each time? If not, how would you resume tracking with the version of the rest of the tree later? ---------------------------------------------------------------------- grahamperrin · 2022-01-20 02:35 Thanks for asking. Continuing with `drm-devel-kmod` as an example, after installing the package: 1. `pkg lock drm-devel-kmod` 2. `cp /usr/local/poudriere/data/packages/main-default/All/drm-devel- kmod-*.pkg ~/Desktop` 3. `su -` 4. `git -C /usr/local/poudriere/ports/default stash` 5. `git -C /usr/local/poudriere/ports/default stash clear` 6. `poudriere ports -u` Step 2 places copies of `⋯.pkg` files on your desktop. With these safely set aside, there's less to think about when cleaning up old or unwanted package files. ### Manual pages * [git-stash\(1\)](https://www.freebsd.org/cgi/man.cgi?query=git- stash&sektion=1&manpath=FreeBSD-ports) * [pkg-add\(8\)](https://www.freebsd.org/cgi/man.cgi?query=pkg- add&sektion=8&manpath=FreeBSD-ports) * [pkg-lock\(8\)](https://www.freebsd.org/cgi/man.cgi?query=pkg- lock&sektion=8&manpath=FreeBSD-ports) * poudriere-pkgclean(8) – , or for poudriere-devel. ### Side note `drm-devel-kmod` is no longer a good example, because the inferior version no longer builds on FreeBSD-CURRENT. I'll explain, and provide a better example, in due course. ---------------------------------------------------------------------- mirror176 · 2022-01-20 07:36 So for someone who rebuilds their ports due to upgrades, it may be easier to keep an older ports tree for that one port, keep a copy of just that directory separate, or rerun the git checkout downgrade after a git fetch or git rebase type of update is completed? I'd play with -current but my understanding is nvidia + freebsd- current does not always get along and my older gtx570 in this machine no longer gets updates anyways (and now causes program incompatibilities on -stable and -release due to Undefined symbol "eglGetPlatformDisplay". I've had much worse experiences with AMD chipsets than Nvidia both on FreeBSD and Windows but 'maybe' I will try an AMD graphics chip if it is expected to get better compatibility and be supported for a longer time with drm-kmod but I've heard it seems buggy still from random internet reports. Maybe there's a way I can get the newer Nvidia library to play with the older driver since they excluded it even though they do install the Linux version of the otherwise missing library.