You are not logged in.

#1 2020-02-19 13:52:59

Dmitry.aka.Jok
Member
Registered: 2020-02-19
Posts: 1

How can I 'freeze' repozitories

Hello!
Need an advice.

I need to administer multiple (> 20) computers. As OS, I use arch linux.
The problem is that these computers are connected via 3G Internet (or even worse) - and I can't update them regularly.
And sometimes I come across a situation where I need to install different small "system" programs (for example, htop), but it turns out that for this you need to install another million dependencies, and it’s not always possible to do this.
As a solution, I see the following option - make my own copy of the repository, "freeze" it and use only it for these computers. (and update them )

I can roughly imagine how to do this, but maybe there is a guide or something similar for arch.
Or you should think about another distribution. Arch was chosen because of minimalism - in fact, I need a basic system, X and openbox, and I do not want to complicate much.

Thanks for attention.

Offline

#2 2020-02-19 14:04:13

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,684

Re: How can I 'freeze' repozitories

No need to create your own - it already exists...
https://wiki.archlinux.org/index.php/Arch_Linux_Archive

Do remember though that by running an outdated system you won't be able te get any help here on the forums for any issues that may arise as a consequence. It also has massive security implications.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-02-19 14:07:23

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,502
Website

Re: How can I 'freeze' repozitories

Arch is rolling release, so I would say it's a pretty bad fit for your intended purpose. However, there is the Arch Linux Archive, which allows you to target a snapshot of the repositories as they were at a specific point in time.

https://wiki.archlinux.org/index.php/Ar … cific_date

This may allow you to scratch your particular itch while remaining on Arch Linux.

I would still recommend something like Debian instead though.


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2020-02-19 14:08:17

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,209
Website

Re: How can I 'freeze' repozitories

Dmitry.aka.Jok wrote:

Or you should think about another distribution. Arch was chosen because of minimalism - in fact, I need a basic system, X and openbox, and I do not want to complicate much.

Debian stable from a netinstall image, perhaps? The limited updates would make it easier for your connection. Some people even put out spins with openbox as the desktop...

EDIT: ninja'd by WorMzy.

Last edited by Head_on_a_Stick (2020-02-19 14:09:15)

Offline

#5 2020-02-19 15:02:27

sabroad
Member
Registered: 2015-05-24
Posts: 118

Re: How can I 'freeze' repozitories

Dmitry.aka.Jok wrote:

I see the following option - make my own copy of the repository, "freeze" it and use only it for these computers. (and update them )
I can roughly imagine how to do this, but maybe there is a guide or something similar for arch.

There is, in fact, a guide for this Network shared pacman cache: Read-only cache


--
saint_abroad

Offline

#6 2020-02-19 15:10:03

webcapcha
Member
Registered: 2019-02-14
Posts: 36

Re: How can I 'freeze' repozitories

If install package from archive like wiki says

pacman -U https://archive.archlinux.org/packages/ ... packagename.pkg.tar.xz

Will later that package will be automatically update using ordinary pacman -Syu?

Offline

#7 2020-02-19 17:13:15

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,502
Website

Re: How can I 'freeze' repozitories

Yes.


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#8 2020-03-10 15:22:46

RubenKelevra
Member
Registered: 2013-03-01
Posts: 35

Re: How can I 'freeze' repozitories

Hey Dmitry,

sounds like you need something like a local cache for packages.

You can use my IPFS-mirror for this purpose:

If all computers are stationary and you just want a centralized server which caches the packages you can setup IPFS on one computer, change the config to a listening address in the local network, for the web-gateway and configure this computer as your mirror server on all other computers like this:

(if your network is 192.168.0.0/24 as an example, and the "server" is on 192.168.0.5)

# IPFS
Server = http://192.168.0.5:8080/ipns/pkg.pacman.store/arch/$arch/default/$repo

The requests will be proxied into the IPFS network, the server will download the packages onto its local storage and keep them there until the storage limit (by default 10 GB) is nearly full and then start to discard them.

You can fetch the updates on all computers at the same time with a systemd-timer or a cronjob like this:

pacman -Syuw --noconfirm

This will reduce the amount of traffic needed, since the db files are all the same and you get the same package versions on all computers. Since it's running in the background, you don't have to do anything.

You can then go ahead and install the updates without fetching a new db with 'pacman -Su' and cause zero traffic smile


Best regards

Ruben

Last edited by RubenKelevra (2020-03-10 15:23:09)

Offline

#9 2020-03-10 15:35:44

ayekat
Member
Registered: 2011-01-17
Posts: 1,370
Website

Re: How can I 'freeze' repozitories

RubenKelevra wrote:

You can fetch the updates on all computers at the same time with a systemd-timer or a cronjob like this:

pacman -Syuw --noconfirm

Please don't suggest things like this to other people. This is equivalent to running `pacman -Sy` as far as partial upgrades are concerned.


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#10 2020-03-10 23:13:15

RubenKelevra
Member
Registered: 2013-03-01
Posts: 35

Re: How can I 'freeze' repozitories

ayekat wrote:
RubenKelevra wrote:

You can fetch the updates on all computers at the same time with a systemd-timer or a cronjob like this:

pacman -Syuw --noconfirm

Please don't suggest things like this to other people. This is equivalent to running `pacman -Sy` as far as partial upgrades are concerned.

Can you be more specific? How do pulling the db and packages in the cache on multiple computers at the same time affect how an update is applied?

Offline

#11 2020-03-10 23:53:33

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,684

Re: How can I 'freeze' repozitories

Because you've updated the pacman db without updating the system. If you then procced to install something using pacman -S it can leave your system in a broken state.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#12 2020-03-11 00:04:56

loqs
Member
Registered: 2014-03-06
Posts: 10,045

Re: How can I 'freeze' repozitories

Pacman -Sy is fine [1] and not a partial upgrade you just have to avoid using pacman -S until you have performed a full upgrade.

[1] https://git.archlinux.org/devtools.git/ … e052dc8dd9

Offline

#13 2020-03-11 14:00:03

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,134

Re: How can I 'freeze' repozitories

loqs wrote:

Pacman -Sy is fine [1] and not a partial upgrade you just have to avoid using pacman -S until you have performed a full upgrade.

[1] https://git.archlinux.org/devtools.git/ … e052dc8dd9

That is one, very unpopular opinion, and I told him before he committed that, that he was going to make an enemy of the support staff because of this.

Please do not consider this to be good advice.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB