PDA

View Full Version : How to deploy delta RPM packages with zypper?



jayvi
10-Mar-2015, 18:59
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?

malcolmlewis
10-Mar-2015, 19:28
On Tue 10 Mar 2015 06:04:02 PM CDT, jayvi wrote:


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!

jayvi
10-Mar-2015, 20:01
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.

jayvi
10-Mar-2015, 21:44
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.

malcolmlewis
10-Mar-2015, 21:45
On Tue 10 Mar 2015 07:04:02 PM CDT, jayvi wrote:


Code:
--------------------

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.




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!

jayvi
10-Mar-2015, 22:31
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.

malcolmlewis
11-Mar-2015, 06:01
On Tue 10 Mar 2015 09:34:01 PM CDT, jayvi wrote:


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!

jayvi
11-Mar-2015, 13:48
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:


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

Saving Primary metadata
Saving file lists metadata
Saving other metadata


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

Doesn't look like it recognized the delta RPM.

# 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

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 createrepo --deltas I had to re-arrange my folder layout:


# 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"?>
<prestodelta>
<newpackage name="my-aix" epoch="0" version="99.0.0" release="126" arch="noarch">
<delta oldepoch="0" oldversion="99.0.0" oldrelease="125">
<filename>drpms/my-aix-99.0.0-125_99.0.0-126.noarch.drpm</filename>
<sequence>my-aix-99.0.0-125-beac8cc49fb8363d0eec60581ed00df59c1110</sequence>
<size>63681</size>
<checksum type="sha">5cb36d09b28582fa37a88a066b4c7aea659bc20e</checksum>
</delta>
</newpackage>
</prestodelta>

But zypper still does not recognize the deltas.


# 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

Note that createrepo generated a prestodelta.xml.gz.

malcolmlewis
11-Mar-2015, 15:28
On Wed 11 Mar 2015 12:54:02 PM CDT, jayvi wrote:


I tried your suggested layout of my repo folder:


Code:
--------------------
# 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 --------------------


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 createrepo --deltas 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"?>
<prestodelta>
<newpackage name="my-aix" epoch="0" version="99.0.0" release="126"
arch="noarch"> <delta oldepoch="0" oldversion="99.0.0" oldrelease="125">
<filename>drpms/my-aix-99.0.0-125_99.0.0-126.noarch.drpm</filename>
<sequence>my-aix-99.0.0-125-beac8cc49fb8363d0eec60581ed00df59c1110</sequence>
<size>63681</size>
<checksum
type="sha">5cb36d09b28582fa37a88a066b4c7aea659bc20e</checksum> </delta>
</newpackage>
</prestodelta>
--------------------


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 --------------------


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!

jayvi
11-Mar-2015, 17:35
The zypper refresh makes no difference. I verified that the delta rpm is valid:


# 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
#


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.

malcolmlewis
11-Mar-2015, 20:19
On Wed 11 Mar 2015 04:44:02 PM CDT, jayvi wrote:


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 #

--------------------


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!