public inbox for [email protected]  
help / color / mirror / Atom feed
From: Philippe Kueck <[email protected]>
To: Devrim Gündüz <[email protected]>
To: [email protected]
Subject: Re: upload of rebuilt packages to the repository
Date: Tue, 6 Mar 2018 16:41:12 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Hi,


On 06.03.2018 15:33, Devrim Gündüz wrote:
> Err, we *never* do so. Can you please give me an example?

I didn't check the previous package of amcheck_next10-1.3-1.rhel7.x86_64
of before march 1st, sorry for that.

But a while ago I filed a bug report for yum and used one of your
packages (libgeotiff) as example:
https://bugzilla.redhat.com/show_bug.cgi?id=1527417

> When we add/update a new package, the metadata is updated, so if the cached
> version (on OS side) does not match, you get this message. That is the only
> reason for this issue (and it is not an issue, IMHO)

If we replace an existing package we get this message. Not by adding a
newer version of it.

Below is a little poc. I'm using dnf (Fedora) but its behaviour doesn't
differ from yum in this case.


Kind regards,

Philippe

--%snip%--
# prepare a dummy repo
$ mkdir -p /tmp/myrepo

# add this dummy repo to yum/dnf
$ cat > /etc/yum.repos.d/test.repo <<EOF
[test]
name=testrepo
baseurl=file:///tmp/myrepo
enabled=0
gpgcheck=0
EOF

# create a dummy package
$ cat > testrpm.spec <<EOF
Name: testrpm
Version: 0.1
Release: 1%{?dist}
Summary: this is a test package
Group: Other
License: GPLv3

%description
Bogus.

%build
date +%s > dummyfile

%install
install -D -p -m644 dummyfile %{buildroot}/%{_sysconfdir}/dummyfile

%files
%{_sysconfdir}/dummyfile
EOF

# build it
$ rpmbuild -bb testrpm.spec

# and add it to the dummy repository
$ mv $(rpm -E %{_rpmdir}/%{_arch})/testrpm*.x86_64.rpm /tmp/myrepo/

# create the dummy repo
$ createrepo /tmp/myrepo/

# build cache
$ dnf --disablerepo='*' --enablerepo=test makecache

# rebuild dummy package
$ rpmbuild -bb testrpm.spec

# replace dummy package
$ mv -f $(rpm -E %{_rpmdir}/%{_arch})/testrpm*.x86_64.rpm /tmp/myrepo/

# and recreate/update the dummy repo
$ createrepo /tmp/myrepo/

# try to install the dummy package
$ dnf --disablerepo='*' --enablerepo=test -y install testrpm
Last metadata expiration check: 0:01:17 ago on Tue 06 Mar 2018 03:53:01
PM CET.
Dependencies resolved.
============================================================================================
 Package              Arch                Version
Repository         Size
============================================================================================
Installing:
 testrpm              x86_64              0.1-1.fc27                test
             6.2 k

Transaction Summary
============================================================================================
Install  1 Package

Total download size: 6.2 k
Installed size: 11
Downloading Packages:
Package "testrpm-0.1-1.fc27.x86_64" from local repository "test" has
incorrect checksum
Error: Some packages from local repository have incorrect checksum

# rebuild cache (which has not expired yet)
$ dnf --disablerepo='*' --enablerepo=test makecache
Last metadata expiration check: 0:02:18 ago on Tue 06 Mar 2018 03:53:01
PM CET.
Metadata cache created.

# try again
$ dnf --disablerepo='*' --enablerepo=test -y install testrpm
Last metadata expiration check: 0:02:21 ago on Tue 06 Mar 2018 03:53:01
PM CET.
Dependencies resolved.
=======================================================================================================
 Package                 Arch                   Version
   Repository            Size
=======================================================================================================
Installing:
 testrpm                 x86_64                 0.1-1.fc27
   test                 6.2 k

Transaction Summary
=======================================================================================================
Install  1 Package

Total download size: 6.2 k
Installed size: 11
Downloading Packages:
Package "testrpm-0.1-1.fc27.x86_64" from local repository "test" has
incorrect checksum
Error: Some packages from local repository have incorrect checksum

# this fixes it
$ dnf --disablerepo='*' --enablerepo=test clean metadata

# so let's start over with a new release

# build and add it
$ sed -i -r -e 's/(Release: )([0-9])/echo \1$((\2+1))/e' testrpm.spec
$ rpmbuild -bb testrpm.spec
$ mv -f $(rpm -E %{_rpmdir}/%{_arch})/testrpm*.x86_64.rpm /tmp/myrepo/
$ createrepo /tmp/myrepo/

# it doesn't install the latest release because of non-expired metadata
# but at least it doesn't show checksum errors
$ yes n | dnf --disablerepo='*' --enablerepo=test install testrpm
Last metadata expiration check: 0:03:31 ago on Tue 06 Mar 2018 04:07:07
PM CET.
Dependencies resolved.
=======================================================================================================
 Package                 Arch                   Version
   Repository            Size
=======================================================================================================
Installing:
 testrpm                 x86_64                 0.1-1.fc27
   test                 6.2 k

Transaction Summary
=======================================================================================================
Install  1 Package

Total size: 6.2 k
Installed size: 11
Is this ok [y/N]: Operation aborted.
--%snip%--




view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: upload of rebuilt packages to the repository
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox