Compare package lists of yast2?
Hello, is there an easy way to compare the exported package list of yast2 meaning the list of 2 different machines? xmldiff is a nightmare. BR
On 04/12/2021 21.55, Markus Egg wrote:
Hello,
is there an easy way to compare the exported package list of yast2 meaning the list of 2 different machines?
xmldiff is a nightmare.
Maybe not use the exported list of yast, but one made by zypper or rpm tailored to your needs. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
Am 04.12.21 um 22:02 schrieb Carlos E. R.:
On 04/12/2021 21.55, Markus Egg wrote:
Hello,
is there an easy way to compare the exported package list of yast2 meaning the list of 2 different machines?
xmldiff is a nightmare. Maybe not use the exported list of yast, but one made by zypper or rpm tailored to your needs.
My probably naive idea was to export the XML list from yast2 from my desktop machine and import it in yast2 on my laptop to get a similar ( except certain possible laptop specific things ) software setting on both machines Afterwards use the laptop for testing. I tried this once with Leap 15.2 and it smashed my laptop completely, I had to reinstall the laptop from scratch. :-( I somehow do remember that this was working on SuSE 13.1 in the old days. So what would be the best way to keep the software on laptop and desktop machine in sync? Is there some other SuSE software for that, which I can use locally (no cloud stuff or internet)? Thanks in advance BR
On 26/12/2021 14.15, Markus Egg wrote:
Am 04.12.21 um 22:02 schrieb Carlos E. R.:
On 04/12/2021 21.55, Markus Egg wrote:
Hello,
is there an easy way to compare the exported package list of yast2 meaning the list of 2 different machines?
xmldiff is a nightmare. Maybe not use the exported list of yast, but one made by zypper or rpm tailored to your needs.
My probably naive idea was to export the XML list from yast2 from my desktop machine and import it in yast2 on my laptop to get a similar ( except certain possible laptop specific things ) software setting on both machines Afterwards use the laptop for testing.
I tried this once with Leap 15.2 and it smashed my laptop completely, I had to reinstall the laptop from scratch. :-( I somehow do remember that this was working on SuSE 13.1 in the old days.
So what would be the best way to keep the software on laptop and desktop machine in sync? Is there some other SuSE software for that, which I can use locally (no cloud stuff or internet)?
I don't know. :-( For fresh installations, there is autoyast, but it is not simple. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
Hi, You can create an AutoYaST XML from an existing system: https://doc.opensuse.org/projects/autoyast/#CreateProfile-CMS-new However I'd say it's more suited to roll out several machines instead of applying configurations on a single personal one. Markus, I would recommend export the package list with zypper: $ zypper se -i | cut -d '|' -f 2 | sed 1,5d > packages.txt To install the packages from the exported list: $ xargs sudo zypper in < installed The latter will return a few "No provider found for OpenSUSE-SLE-xxx", which can be ignored, and it will skip already installed packages. To automate it, -y can be added to the install command, but in that case one should make sure the exported packagelist only contains packages one actually wants on the new system, as it skips the confirmation prompt. If your software packages require specific configurations, you might want to consider copying the respective /etc or ~/.config directories too. Best, Georg On 12/26/21 18:42, Carlos E. R. wrote:
On 26/12/2021 14.15, Markus Egg wrote:
Am 04.12.21 um 22:02 schrieb Carlos E. R.:
On 04/12/2021 21.55, Markus Egg wrote:
Hello,
is there an easy way to compare the exported package list of yast2 meaning the list of 2 different machines?
xmldiff is a nightmare. Maybe not use the exported list of yast, but one made by zypper or rpm tailored to your needs.
My probably naive idea was to export the XML list from yast2 from my desktop machine and import it in yast2 on my laptop to get a similar ( except certain possible laptop specific things ) software setting on both machines Afterwards use the laptop for testing.
I tried this once with Leap 15.2 and it smashed my laptop completely, I had to reinstall the laptop from scratch. :-( I somehow do remember that this was working on SuSE 13.1 in the old days.
So what would be the best way to keep the software on laptop and desktop machine in sync? Is there some other SuSE software for that, which I can use locally (no cloud stuff or internet)?
I don't know. :-(
For fresh installations, there is autoyast, but it is not simple.
On 26/12/2021 19.16, Georg Pfuetzenreuter wrote:
Hi,
You can create an AutoYaST XML from an existing system: https://doc.opensuse.org/projects/autoyast/#CreateProfile-CMS-new
However I'd say it's more suited to roll out several machines instead of applying configurations on a single personal one.
Markus, I would recommend export the package list with zypper: $ zypper se -i | cut -d '|' -f 2 | sed 1,5d > packages.txt
Problem: it doesn't contain repository information, for installations with things coming from different repos. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On Monday 27 December 2021, Carlos E. R. wrote:
On 26/12/2021 19.16, Georg Pfuetzenreuter wrote:
Hi,
You can create an AutoYaST XML from an existing system: https://doc.opensuse.org/projects/autoyast/#CreateProfile-CMS-new
However I'd say it's more suited to roll out several machines instead of applying configurations on a single personal one.
Markus, I would recommend export the package list with zypper: $ zypper se -i | cut -d '|' -f 2 | sed 1,5d > packages.txt
Problem: it doesn't contain repository information, for installations with things coming from different repos.
Rpm can report any tag. What above something similar to $ rpm -q -a --queryformat '%{VENDOR} | %{NAME} | %{VERSION}\n' To see all tags: $ rpm --querytags The problem I see is that hardware/driver specific packages may need to be filtered out. Cheers, Michael
Michael Hamilton wrote:
Rpm can report any tag. What above something similar to $ rpm -q -a --queryformat '%{VENDOR} | %{NAME} | %{VERSION}\n'
To see all tags:
$ rpm --querytags
The problem I see is that hardware/driver specific packages may need to be filtered out. I also use such a command to export or backup my RPM package list. This is my script:
So what would be the best way to keep the software on laptop and desktop machine in sync? The problem is, that it is difficult or impossible to restore a package
#! /bin/sh BACKUP_DIR=/var/adm/backup/$(hostname) HEADER="DISTRIBUTION\tVENDOR\tGROUP\tNAME\tVERSION" QUERYFORMAT="%{DISTRIBUTION}\t%{VENDOR}\t%{GROUP}\t%{NAME}\t%{VERSION}\n" mkdir -pv "$BACKUP_DIR" echo -e "$HEADER" > "$BACKUP_DIR"/rpm-qa.txt rpm -qa --queryformat "$QUERYFORMAT" | sort -t" " -k1,1 -k2,2 -k3,3 -k4,4 -k5,5V >> "$BACKUP_DIR"/rpm-qa.txt Markus Egg wrote: list with an exact package status from a saved package list. The idea for restoring is to install packages from each repository separately. If you for instance want to install "subversion" from repository "devel:tools:scm:svn" with zypper install --from devel:tools:scm:svn subversion then also the dependencies of subversion are installed from "devel:tools:scm:svn". But this may not result in exactly the same package state as in the saved list. Greetings, Björn
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2021-12-27 at 11:31 +0100, Bjoern Voigt wrote:
Rpm can report any tag. What above something similar to $ rpm -q -a --queryformat '%{VENDOR} | %{NAME} | %{VERSION}\n'
To see all tags:
$ rpm --querytags
The problem I see is that hardware/driver specific packages may need to be filtered out. I also use such a command to export or backup my RPM package list. This is my
Michael Hamilton wrote: script:
#! /bin/sh
BACKUP_DIR=/var/adm/backup/$(hostname) HEADER="DISTRIBUTION\tVENDOR\tGROUP\tNAME\tVERSION" QUERYFORMAT="%{DISTRIBUTION}\t%{VENDOR}\t%{GROUP}\t%{NAME}\t%{VERSION}\n"
mkdir -pv "$BACKUP_DIR" echo -e "$HEADER" > "$BACKUP_DIR"/rpm-qa.txt rpm -qa --queryformat "$QUERYFORMAT" | sort -t" " -k1,1 -k2,2 -k3,3 -k4,4 -k5,5V >> "$BACKUP_DIR"/rpm-qa.txt
Ah. Tried it. DISTRIBUTION VENDOR GROUP NAME VERSION openSUSE Leap 15.2 openSUSE Unspecified wallpaper-branding-openSUSE 15.2.20200203 openSUSE Leap 15.2 openSUSE Unspecified wpa_supplicant 2.9 openSUSE Leap 15.2 openSUSE Unspecified yast2-qt-branding-openSUSE 15.2.20200203 openSUSE Leap 15.2 openSUSE Unspecified zlib-devel 1.2.11 openSUSE Leap 42.3 openSUSE Development/Libraries/Other libmysqlclient18 10.0.35 openSUSE:Leap:15.2:NonFree openSUSE Productivity/Archiving/Compression unrar 5.9.3 openSUSE:Leap:15.2:NonFree openSUSE Productivity/Graphics/Other AdobeICCProfiles 2.0 openSUSE:Leap:15.2:NonFree openSUSE Productivity/Graphics/Viewers xv 3.10a openSUSE:Leap:15.2:NonFree openSUSE Unspecified iozone 3.488 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science Development/Tools/Other pocl 1.5 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science Productivity/Clustering/Computing hpcc-openmpi 1.4.3 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science System/Libraries libopencv3_4 3.4.16 science / openSUSE_Leap_15.2 obs://build.opensuse.org/science System/Libraries libpocl2 1.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Debug libassuan-debugsource2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Debug libassuan0-debuginfo2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/C and C++ libassuan0 2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/C and C++ libassuan-devel 2.5.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/C and C++ pkcs11-helper1.25.1 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Development/Libraries/Perl perl-pcsc 1.4.14 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Productivity/Security opensc 0.22.0 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard Productivity/Security pcsc-lite 1.9.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Libraries libopenct1 0.6.20 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Libraries libpcsclite1 1.9.5 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Libraries libpkcs11-helper1 1.25.1 security:chipcard / openSUSE_Leap_15.2 obs://build.opensuse.org/security:chipcard System/Management pcsc-tools 1.5.8 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-Authen-NTLM 1.09 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-JSON-WebToken 0.10 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-Object-Realize-Later 0.21 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Development/Libraries/Perl perl-User-Identity 1.00 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Productivity/Networking/Email/Clients alpine 2.25 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Productivity/Networking/Email/Utilities imapsync 1.977 server:mail / openSUSE_Leap_15.2 obs://build.opensuse.org/server:mail Productivity/Networking/Email/Utilities mairix 0.24 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Documentation/SUSE pin 0.40 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Productivity/File utilities duff 0.5 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Productivity/Text/Utilities most pre5.2 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities System/Console dog 1.7 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities System/Packages opi 2.4.2 utilities / openSUSE_Leap_15.2 obs://build.opensuse.org/utilities Unspecified ncdu 1.16 Sometimes, the vendor is directly the repository name, this did not happen before. I'm confused by your sort command, what does it do?
Markus Egg wrote:
So what would be the best way to keep the software on laptop and desktop machine in sync? The problem is, that it is difficult or impossible to restore a package list with an exact package status from a saved package list.
The idea for restoring is to install packages from each repository separately. If you for instance want to install "subversion" from repository "devel:tools:scm:svn" with
zypper install --from devel:tools:scm:svn subversion
then also the dependencies of subversion are installed from "devel:tools:scm:svn". But this may not result in exactly the same package state as in the saved list.
No, for that you add "--nodeps". Huh, no, that option is for rpm. Then, something similar :-? - -- Cheers, Carlos E. R. (from openSUSE 15.2 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYcmc0xwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVeTwAni1e+IfFt2XTzoDHYnTU C4ryIhKZAJ9JRf6Q7/Apf0UfPtk/P3cogyMRzQ== =EBHK -----END PGP SIGNATURE-----
Carlos E. R. wrote:
I'm confused by your sort command, what does it do? It sorts by DISTRIBUTION (first priority), VENDOR (second priority), GROUP (third priority), NAME (fourth priority).
No, for that you add "--nodeps". Huh, no, that option is for rpm. There is no matching option in Zypper like RPM's --nodeps. As a work-around you can download everything, what you need from a specific repository with "zypper install --download-only --from=repositoryname", then delete the dependencies and then install the rest directly with "rpm --nodeps --force". But this is not an elegant solution.
Greetings, Björn
On Mon, Dec 27, 2021 at 8:20 AM Michael Hamilton <michael@actrix.gen.nz> wrote:
Problem: it doesn't contain repository information, for installations with things coming from different repos.
Rpm can report any tag.
Package repository is not in RPM metadata. Zypper simply shows you all repositories that provide a package with a given name and assumes the package comes from the repository if the installed version is the same as the version in the repository. So there is no reliable way to have it. Sometimes the "vendor" tag contains reference to the OBS repository, but e.g. in Leap 15.3 you will see openSUSE and SUSE as vendors.
On 27/12/2021 15.49, Andrei Borzenkov wrote:
On Mon, Dec 27, 2021 at 8:20 AM Michael Hamilton <michael@actrix.gen.nz> wrote:
Problem: it doesn't contain repository information, for installations with things coming from different repos.
Rpm can report any tag.
Package repository is not in RPM metadata. Zypper simply shows you all repositories that provide a package with a given name and assumes the package comes from the repository if the installed version is the same as the version in the repository. So there is no reliable way to have it.
Sometimes the "vendor" tag contains reference to the OBS repository, but e.g. in Leap 15.3 you will see openSUSE and SUSE as vendors.
So, there could be two repos with the same vendor, and zypper could update from any of them while "keeping the vendor" quite happily. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On Tuesday 28 December 2021, Andrei Borzenkov wrote:
On Mon, Dec 27, 2021 at 8:20 AM Michael Hamilton <michael@actrix.gen.nz> wrote:
Problem: it doesn't contain repository information, for installations with things coming from different repos.
Rpm can report any tag.
Package repository is not in RPM metadata. Zypper simply shows you all repositories that provide a package with a given name and assumes the package comes from the repository if the installed version is the same as the version in the repository. So there is no reliable way to have it.
Sometimes the "vendor" tag contains reference to the OBS repository, but e.g. in Leap 15.3 you will see openSUSE and SUSE as vendors.
That's a useful/disturbing piece of info. I guess things kind of work, but it's something to bear in mind when I see those "with vendor change" messages.
participants (6)
-
Andrei Borzenkov
-
Bjoern Voigt
-
Carlos E. R.
-
Georg Pfuetzenreuter
-
Markus Egg
-
Michael Hamilton