How to deploy delta RPM packages with zypper?

I posted this thread last week in the SLES Configure-Administrator forum but I did not receive an answer. Perhaps this is a better forum.

I know how to create and apply delta RPM’s, but I don’t know what support zypper provides for working with delta RPM’s. I have registered a zypper repository with --keep-packages option. It would be great if zypper could apply a delta RPM to the base package and apply the newer package. But I don’t know how to make that happen. You can refer to https://forums.suse.com/showthread.php?6076-Using-delta-RPM-s-with-zypper&goto=newpost for my earlier post.

Is this possible?

Hi
Have you configured /etc/zypp/zypp.conf with;

download.use_deltarpm.always = true


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

vagrant@linux-a2qz:~/tr> grep delta /etc/zypp/zypp.conf
# download.use_deltarpm = true
# download.use_deltarpm.always = true

I assume the default values are in the comments.

After some more reflecting, I think that the root of the problem probably may be with the remote zypper repository. I manually create the delta rpm’s my self and copy them into the zypper repository.

Is the filename of the delta repository important? I hope not. Or maybe it has to have a .delta.rpm extension. Dunno.

I create the zypper repo with:

# createrepo .

where . contains both full rpms and delta rpms.

Is this correct?

When I look at my SMT repos, I see that the repodata contains a deltainfo.xml.gz. How did that file get created by SUSE? I can’t get createrepo to generate a deltainfo.xml.gz for me.

Hi
The only other thing maybe your delta rpm repository, I assume your
using createrepo with the --deltas rpm option?


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I just tried using createrepo with the --deltas option. It created a repodata/prestodelta.xml.gz. But zypper still doesn’t download the delta rpm. It downloads the full rpm.

Again, this would be a lot easier if there was published documentation on how to use this feature.

Hi
The delta rpms should end in the extension .drpm and reside in the arch
eg x86_64.

Then you run createrepo in the root of your folder containing the rpm
sub directories.

See http://sfo-korg-mirror.kernel.org/opensuse/update/13.2/ for an
example or the structure which should be created by createrepo.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I tried your suggested layout of my repo folder:

# ls -R noarch/ noarch/: my-aix-99.0.0-125_99.0.0-126.noarch.drpm my-aix-99.0.0-125.noarch.rpm

I then executed:

[CODE]# createrepo .
Spawning worker 0 with 1 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata[/CODE]

# ls repodata/ filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml

Doesn’t look like it recognized the delta RPM.

[CODE]# zypper se --details my-aix
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
–±-------------±--------±--------------------------------------±-------±----------
i | my-aix | package | 99.0.0-125 | noarch | tr[/CODE]

When I added the --deltas option it created an empty prestodelta.xml.gz. Createrepo does not recognize the delta rpm with this file layout.

FYI: I’m on SLES 11 SP3

So I tried something else. In order to use [FONT=Courier New]createrepo --deltas[/FONT] I had to re-arrange my folder layout:

[CODE]# ls -R.
.:
drpms noarch

./drpms:
my-aix-99.0.0-125_99.0.0-126.noarch.drpm

./noarch:
my-aix-99.0.0-125.noarch.rpm

createrepo --deltas .

Spawning worker 0 with 1 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Saving delta metadata

#zcat repodata/prestodelta.xml.gz

<?xml version="1.0" encoding="UTF-8"?> drpms/my-aix-99.0.0-125_99.0.0-126.noarch.drpm my-aix-99.0.0-125-beac8cc49fb8363d0eec60581ed00df59c1110 63681 5cb36d09b28582fa37a88a066b4c7aea659bc20e [/CODE]

But zypper still does not recognize the deltas.

[CODE]# zypper se --details my-aix
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
–±-------------±--------±--------------------------------------±-------±----------
i | my-aix | package | 99.0.0-125 | noarch | tr[/CODE]

Note that createrepo generated a prestodelta.xml.gz.

Hi
That info looks right.

If you force a cache rebuild on the target machine
then list updates;

zypper ref -f
zypper lu

Does it now appear as an update?


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

The zypper refresh makes no difference. I verified that the delta rpm is valid:

[CODE]# applydeltarpm -r noarch/my-aix-99.0.0-125.noarch.rpm drpms/my-aix-99.0.0-125_99.0.0-126.noarch.drpm 126.rpm

cmp 126.rpm …/tmp/my-aix-99.0.0-126.noarch.rpm

[/CODE]

I’ve studied the /var/log/zypper.log and found no errors or warnings.

The repo is a local repo, not an http repo, if that matters.

Hi
So why does it create the prestodelta it should be deltainfo plus all
the other files required when running createrepo…

Your system is all up to date with patches etc (there are a couple for
create repo)?

AFAIK, the layout of the repo should be as per the example, I also see
this option --oldpackagedirs= to make deltas against so you should not
need to manually create, just have the old and new present…


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!