Install released updates to date X

Dear mates,

I'd like to know if it's possible to install the system updates to a specific date, I mean be able to install only the updates released before the date I want and block everything afterwards.

Let me explain exactly what I need:

I'll install Ubuntu 18.04.2 from scratch and want to install all updates released to the date of June 1st.

For example, there's this package

mesa-vdpau-drivers_19.0.2-1ubuntu1~18.04.1_amd6.. released on 09-May-2019 20:28

And that's what I want to keep.

mesa-vdpau-drivers_19.0.2-1ubuntu1.1~18.04.1_am..> 06-Jun-2019 19:03
mesa-vdpau-drivers_19.0.2-1ubuntu1.1~18.04.2_am..> 19-Jul-2019 08:28

These versions come after, but I want to block its installation and everything else after the date of June 1st.
All system updates.

Is it possible to achieve?

Command lines, 3rd party programs, please any idea will help.

Thank you for your assistance.

You can 'hold' individual packages using "apt-mark" (don't include the quotes) but I don't know about 'holding' everything, e.g,

apt-mark hold <package name>

Replace<package name> with actual package.

I'm aware of this command.

The point is, Ubuntu 18.04.2 used to ship with
mesa-vdpau-drivers_18.2.8-0ubuntu0~18.04.2_amd6..> 09-Feb-2019 18:55

But I need to install
mesa-vdpau-drivers_19.0.2-1ubuntu1~18.04.1_amd6.. released on 09-May-2019 20:28

I can't hold version 18.2.8, neither update and hold 19.0.8 that is the latest.
Only then with version 19.0.2 I could make use of the 'hold' command.

Remember that I'm using mesa-vdpau-drivers just as an example, I need all system updates released before June 1st.

Maybe a way to set the repositories to receive updates released only before this date?

In Debian terms, I think you're looking for "snapshot" of an Apt repository, but unfortunately I don't think Ubuntu has an equivalent.

Launchpad normally keeps an archive of past packages. Though Launchpad can be tricky to navigate and dependencies is another thing to consider.

https://launchpad.net/ubuntu/bionic/+source/mesa
https://launchpad.net/ubuntu/bionic/+package/mesa-vdpau-drivers

https://launchpad.net/ubuntu/+source/mesa/19.0.2-1ubuntu1
https://launchpad.net/ubuntu/+source/mesa/19.0.2-1ubuntu1/+build/16615850


If there's a mirror that haven't updated beyond a certain date, that would be the easiest - but 3 months is quite some time - none of them are older then 1-2 weeks:

https://launchpad.net/ubuntu/+archivemirrors

There is a Launchpad API in Python, which could be scripted if you knew all the package names and versions of the archive at that time.

wget https://launchpad.net/ubuntu/+archive/primary/+files/<package-name>_<version>_<arch>.deb

A less precise date to June 2019 is to take a point release (18.04.2 / Feb 2019) as a base; download/update specific packages, hold them, and update everything else... but this could lead to breakages down the road.

1 Like

In theory one can compose and maintain a repository using 'aptly' (https://www.aptly.info/) and do not use anything else.

Great answers, thank you.

I think the closest Ubuntu has to a snapshot is the repository 'Main' which contains the earliest base packages from the first point release.
https://packages.ubuntu.com/bionic/mesa-vdpau-drivers

It can be accessed simply by disabling bionic-updates repo in Software & Updates, or adding
sudo add-apt-repository "deb http://mirrors.kernel.org/ubuntu/ bionic main restricted universe multiverse". Then you'll be able to work and download only these packages.

The problem is that mesa-vdpau-drivers is not included by default on a Ubuntu installation. If you enable "third-party software" on the LiveCD or try it afterwards, it will install the latest version.

It would of great help for me to install the entire mesa source package and every dependency it requires, to this version:
https://launchpad.net/ubuntu/+source/mesa/19.0.2-1ubuntu1~18.04.1/+build/16762182

Which would be the best way to get it running on my system?

I'm also in need of this package
https://launchpad.net/ubuntu/+source/libdrm/2.4.95-1~18.04.1/+build/15707962

It's a version I was using earlier, but I downloaded the .deb files (except devs and dbgsym), performed a sudo dpkg -i *.deb on the folder, it installed without warnings but then it broke the system and I wasn't able to login. It happens with every version I try, and I don't have a clue why.

That's why I'm asking for a more traditional way like an official repo from an early time, that will install everything I need in the case, and much likely, I miss something.

The updates Ubuntu released on 2019-07-03 broke the HW acceleration on my system, since then I'm intensively searching for a solution, created bug reports, without success.
I hope you guys can save me :wink:

God, how I wish I had a timeshift snapshot backed up.

I am afraid that the only more or less pragmatic solution is to install from scratch and add must-to-have extra packages from downloaded .deb's and do not update at all. (sigh and shrug)

I already tried many times, trust me. Didn't have satisfactory results :frowning:

https://launchpad.net/ubuntu/+source/mesa/19.0.2-1ubuntu1~18.04.1/+build/16762182

Is downloading and manually install these .deb files the only way from launchpad?

mesa_19.0.2.orig.tar.gz

If I grab this packed mesa, how could I install it properly?

You could compile that specific version yourself and install it to /usr/local. Software stored in /usr/local overrides what's installed by packages in /usr/bin, /etc/, /usr/share , etc effectively ensuring it will persist between updates while having an up-to-date system.

This could introduce new problems in the long-term, like wanting to uninstall if you delete the source code folder (sudo make clean).

  1. First enable the "Source Code" repository in Software & Updates.

  2. Grab the packages needed to compile the software:

    sudo apt build-dep mesa
    
  3. Extract that tar file and build it - presumably:

    ./configure
    make -j4              # Set -j4 to number of CPU cores to speed it up
    sudo make install
    

Once installed, you'll want to reboot and check if the older version is running and determine whether it's safe/worthwhile to remove the system packages.

Since this is tinkering with the graphics part of the system, it may be safer to test in a virtual machine before doing it on real hardware, since there is always a chance of breaking the graphical portion of your system.