Accepting request 544383 from system:packagemanager

OBS-URL: https://build.opensuse.org/request/show/544383
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dpkg?expand=0&rev=21
This commit is contained in:
Dominique Leuenberger 2017-11-30 11:33:03 +00:00 committed by Git OBS Bridge
commit 2ba4fd00c0
4 changed files with 55 additions and 18 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 8 16:15:47 UTC 2017 - mpluskal@suse.com
- Small cleanup with spec-cleaner
- Update dependencies
-------------------------------------------------------------------
Mon Mar 27 12:31:08 UTC 2017 - tchvatal@suse.com

View File

@ -16,7 +16,6 @@
#
%define admindir %{_localstatedir}/lib/rpm/
Name: dpkg
Version: 1.18.23
Release: 0
@ -34,20 +33,21 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libbz2-devel
BuildRequires: libmd-devel
BuildRequires: libselinux-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: update-alternatives
BuildRequires: xz
BuildRequires: xz-devel
BuildRequires: zlib-devel
BuildRequires: perl(Date::Parse)
BuildRequires: perl(IO::String)
Requires: cpio
Requires: make
Requires: patch
Requires: perl = %{perl_version}
Requires: update-alternatives
Requires: perl(Date::Parse)
%{perl_requires}
Requires(post): coreutils
Recommends: perl(File::FcntlLock)
Provides: deb = %{version}
@ -55,7 +55,6 @@ Obsoletes: deb < %{version}
Provides: dpkg-dev = %{version}
Provides: dpkg-doc = %{version}
Provides: dselect = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package contains tools for working with Debian packages. It makes
@ -69,6 +68,7 @@ dpkg-doc, dpkg-dev.
Summary: Development files for dpkg
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libmd-devel
Provides: deb-devel = %{version}
Obsoletes: deb-devel < %{version}
@ -144,10 +144,8 @@ done
exit 0
%files lang -f %{name}.lang
%defattr(-,root,root)
%files
%defattr(-,root,root)
%doc ABOUT-NLS AUTHORS COPYING doc/triggers.txt NEWS README* THANKS TODO debian/changelog
%{_mandir}/man*/*
%exclude %{_mandir}/man*/update-alternatives*
@ -164,7 +162,6 @@ exit 0
%{perl_vendorlib}/Dselect/Ftp.pm
%files devel
%defattr(-,root,root)
%{_libdir}/libdpkg.a
%{_libdir}/libdpkg.la
%{_libdir}/pkgconfig/libdpkg.pc

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Wed Nov 22 11:06:33 UTC 2017 - dimstar@opensuse.org
- Migrate u-a data from /var/lib/rpm instead of relying on dbpath:
no u-a version ever installed files explicitly into dbpath, but
always hard specified /var/lib/rpm. The fact that RPM moved its
database is irrelevant to update-alternatives. In case RPM moved
it's database, our files are still accessible via the
/var/lib/rpm symlink being put in place.
- Drop the arbitrary depenency on a specific rpm version: the idea
was to ensure to have an rpm with the new dbpath location in
place. For one, the dependency does not work as intended, and
2nd, as the migration now happens explicitly from the old u-a
admindir without relying on dbpath, is no longer needed.
-------------------------------------------------------------------
Mon Nov 20 14:50:53 UTC 2017 - mpluskal@suse.com
- Move update alternatives database to new location
- Update rpm requirements to avoid unnecessary builds
-------------------------------------------------------------------
Tue Nov 7 19:57:49 UTC 2017 - mpluskal@suse.com
- Use dbpath macro for locationg rpm state directory
- Require exactly same version of rpm we had when building to make
sure dbpath matches
-------------------------------------------------------------------
Wed Aug 9 10:43:10 UTC 2017 - tchvatal@suse.com

View File

@ -16,14 +16,13 @@
#
%define admindir %{_localstatedir}/lib/rpm/
Name: update-alternatives
Version: 1.18.23
Release: 0
Summary: Maintain symbolic links determining default commands
License: GPL-2.0+
Group: System/Management
Url: http://ftp.de.debian.org/debian/pool/main/d/dpkg/
URL: http://ftp.de.debian.org/debian/pool/main/d/dpkg/
Source0: http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.xz
Source3: sensible-editor
Patch0: update-alternatives-suse.patch
@ -34,11 +33,9 @@ BuildRequires: automake
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
BuildRequires: xz
Requires(post): coreutils
Requires(post): update-alternatives
Provides: alternatives = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
update-alternatives creates, removes, maintains and displays
@ -59,8 +56,8 @@ particular preference.
%build
autoreconf -fvi
%configure \
--disable-silent-rules \
--with-admindir=%{admindir}
--disable-silent-rules \
--with-admindir=%{_localstatedir}/lib
make -C lib/compat %{?_smp_mflags}
make -C utils/ %{?_smp_mflags}
@ -70,14 +67,24 @@ make -C man/ %{?_smp_mflags}
install -d -m 0755 %{buildroot}/%{_sbindir}/
install -d -m 0755 %{buildroot}/%{_mandir}/man1/
install -d -m 0755 %{buildroot}/%{_sysconfdir}/alternatives
install -d -m 0755 %{buildroot}/%{admindir}/alternatives
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/alternatives
install -d -m 0755 %{buildroot}/%{_localstatedir}/log
install -m 0755 utils/%{name} %{buildroot}/%{_sbindir}
install -pm 0755 utils/%{name} %{buildroot}/%{_sbindir}
ln -s %{name} %{buildroot}/%{_sbindir}/alternatives
install -m 0644 man/%{name}.1 %{buildroot}/%{_mandir}/man1/
install -pm 0644 man/%{name}.1 %{buildroot}/%{_mandir}/man1/
%post
# Migrate to new location
if [ -d var/lib/rpm/alternatives ]; then
echo "migrating update alternatives database to new location"
# We proceed even if no alternatives directory exists, such situation
# occurs in buildroot environment (we can't buildrequire package
# itself).
mv -f var/lib/rpm/alternatives/* /var/lib/alternatives/ || :
rmdir var/lib/rpm/alternatives ||:
fi
touch %{_localstatedir}/log/alternatives.log
# Fix broken alternatives list bnc#969171
cd %{_sysconfdir}/alternatives/
@ -87,10 +94,9 @@ for i in $(ls .) ; do
done
%files
%defattr(-,root,root,-)
%doc COPYING
%dir %{_sysconfdir}/alternatives
%dir %{_localstatedir}/lib/rpm/alternatives
%dir %{_localstatedir}/lib/alternatives
%{_sbindir}/alternatives
%{_sbindir}/update-alternatives
%{_mandir}/man1/update-alternatives.1%{ext_man}