Re: Sync rpms with other computer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/27/20 2:50 AM, Mayavimmer wrote:
Why only use NAME and ARCH?

As long as the source system is fully up-to-date, the EVR is probably ok and ARCH would only be necessary if you have some multi-arch packages installed, like for wine. Otherwise, just "NAME" is the best option. Then you don't have to worry about packages getting updated in the meantime.

Anyway, summary of interesting points, so far:
* There is probably no ready made script, then write one.
* Let's call the two hosts Master and Clone.
* Should probably install Master-only packages first, then remove
Clone-only ones.
* Clone the Master repo configuration, possibly removing Clone-only repos?

Why or how do the two systems have different repo configurations? Are you adding third-party repos (other than rpmfusion)?

.... But could have problems removing rpms!

Removing rpms doesn't require the source repo config.

.... And may not want redundant repos??

repos generally have fixed filenames, unless you're doing something custom, so this won't happen.

.... Maybe solve this problem by inverting the order like this:
........ 1. Remove Clone-only rpms (ugh, could remove too much!)
........ 2. Zero Clone repo config and replace with Master repo config
........ 3. Install
* Prepare rpmlist for easy parsing, maybe use the tilde char:
.... rpm -qa --qf="%{NAME}-%{EVR}.%{ARCH}\n"  # almost same as rpm -qa
.... rpm -qa --qf="%{NAME}~%{EVR}~%{ARCH}\n"  # almost same as rpm -qa
* Identify special rpms to exclude from cloning:
.... *-gpg-pubkey-*
.... Some xorg rpm tied to a non default graphics card

This doesn't matter.

.... Other rpms that were installed non from repo in Master
* What to do when downgrading some rpms??

Avoid this potential issue by not including the EVR.

* Ok, here is a first attempt at the install-first-then-remove case:
.... 1. Ensure Clone repo config is the same Master's.
.... 2. Master # rpm -qa --qf="%{NAME}~%{EVR}~%{ARCH}\n"
........ | sort | grep -v gpg-pubkey > master-rpms
........ # Note: still not exactly the same as rpm -qa
.... 3. Clone # rpm -qa --qf="%{NAME}~%{EVR}~%{ARCH}\n"
........ | sort | grep -v gpg-pubkey > clone-rpms
.... 4. Compare the two lists in various ways, using tilde fields.
.... 4. Edit master-rpms to eliminate unwanted rpms.
.... 5. Clone # dnf install $(<edited-master-rpms)
.... # Now do it again to compare
.... 6. Clone # rpm -qa --qf="%{NAME}~%{EVR}~%{ARCH}\n"
........ | sort | grep -v gpg-pubkey > clone-rpms
.... 7. Clone # vimdiff edited-master-rpms clone-rpms
.... 8. Repeat until all differences are sorted out

When you get to point of removing the extra rpms from the clone, I would suggest using "--noautoremove" with the dnf command, otherwise it might remove more than you expect.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux