dpkg/dpkg.spec

189 lines
5.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package dpkg
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: dpkg
Version: 1.22.6
Release: 0
Summary: Debian package management system
- Version update to 1.19.0.5: * Fix directory traversal with dpkg-deb --raw-extract, by guaranteeing that the DEBIAN pathname does not exist. Closes: #879982 Reported by Jakub Wilk <jwilk@jwilk.net>. * Rename DPKG_GAIN_ROOT_CMD to DEB_GAIN_ROOT_CMD in the R³ support, as the variable is expected to be set by any builder, not just dpkg. And introduce ephemereal backwards compatibility even though there are no known users. * Do not set DEB_GAIN_ROOT_CMD in dpkg-buildpackage when the R³ value is <implementations-keywords>, following the specification. * Specify that DEB_GAIN_ROOT_CMD in R³ should preserve the environment. Proposed by Josh Triplett <josh@joshtriplett.org>. * Specify new DEB_RULES_REQUIRES_ROOT variable for R³ support. * Declare R³ specification as "recommendation, stable" with version 1.0. * Architecture support: - Add support for riscv64 CPU. Closes: #822914 Thanks to Manuel A. Fernandez Montecelo <mafm@debian.org> * Perl modules: - Dpkg::Vendor::Debian: Use proper %use_feature key. This was causing perl errors on paths not accapted for fixdebugpath. Reported by Mattia Rizzolo <mattia@debian.org>, on IRC. Closes: #881051 - Check that $state->{seen} exists instead of $state being just defined. Fixes regression in dpkg-gensymbols symbols output. Thanks to Dmitry Shachnev <mitya57@debian.org>. Closes: #880166 - Mark hurd-i386 as having gcc builtin PIE in Dpkg::Vendor::Debian. Requested by Samuel Thibault <sthibault@debian.org>. - split the u-a to separate spec file to reduce a build cycle - update to debhelper-7.3.12 - update to debhelper-7.2.16 * dh_scrollkeeper: Now a deprecated no-op. OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=65
2018-06-28 13:05:57 +02:00
License: GPL-2.0-or-later
Group: System/Packages
URL: https://tracker.debian.org/pkg/%{name}
Source0: https://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz
Source3: sensible-editor
# PATCH-FIX-OPENSUSE replace debian with opensuse. replace macros. update-alternatives temp directories' path and name from dpkg* to rpm*.
Patch1: update-alternatives-suse.patch
# PATCH-FIX-SUSE: tar of Leap 42.{2,3} does not recognize --sort=name, --clamp-mtime options
Patch2: drop-tar-option.patch
Patch3: ncurses-fix.patch
Patch4: openssl.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: gpg2
BuildRequires: libbz2-devel
BuildRequires: libselinux-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: perl >= 5.28.1
BuildRequires: po4a >= 0.59
BuildRequires: update-alternatives
BuildRequires: xz-devel
BuildRequires: zlib-devel
BuildRequires: perl(Date::Parse)
BuildRequires: perl(IO::String)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Strict)
Requires: cpio
Requires: make
Requires: patch
Requires: update-alternatives
Requires: perl(Date::Parse)
Requires(post): coreutils
Recommends: perl(File::FcntlLock)
Provides: deb = %{version}
Obsoletes: deb < %{version}
Provides: dpkg-dev = %{version}
Provides: dpkg-doc = %{version}
Provides: dselect = %{version}
%{perl_requires}
%description
This package contains tools for working with Debian packages. It makes
it possible to create and extract Debian packages. If Alien is
installed, the packages can be converted to RPMs.
This package contains the following Debian packages: dpkg, dselect,
dpkg-doc, dpkg-dev.
%package devel
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}
%description devel
Libraries and header files for dpkg.
%lang_package
%prep
%setup -q
%patch -P 1 -p1
%if 0%{?suse_version} == 1315
%patch -P 2 -p1
%endif
%patch -P 3 -p1
%patch -P 4 -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
autoreconf -fvi
export CFLAGS="%{?build_cflags:%build_cflags}%{?!build_cflags:%optflags}"
%configure \
--disable-silent-rules \
--with-libselinux \
--localstatedir=%{_localstatedir}/lib \
--with-admindir=%{_localstatedir}/lib/dpkg \
--docdir=%{_docdir}/%{name}
# configure somehow does not detect architecture correctly in OBS (bnc#469337), so
# let's do an awful hack and fix it in config.h
# XXX: who knows if this works on s390? :)
%define debarch %{_arch}
%ifarch x86_64
%define debarch amd64
%endif
%ifarch %{ix86}
%define debarch i386
%endif
%ifarch ppc powerpc
%define debarch powerpc
%endif
%ifarch ppc64 powerpc64
%define debarch ppc64
%endif
sed -i 's/^#define ARCHITECTURE ""/#define ARCHITECTURE "%{debarch}"/' config.h
%make_build
%install
%make_install
# remove update-alternatives stuff (included in separate package)
rm -rf %{buildroot}%{_sysconfdir}/alternatives
rm -rf %{buildroot}%{_localstatedir}/lib/dpkg/alternatives
rm -rf %{buildroot}%{_bindir}/update-alternatives
rm -rf %{buildroot}%{_sbindir}/update-alternatives
rm -rf %{buildroot}%{_mandir}/man8/update-alternatives.8
rm -rf %{buildroot}%{_mandir}/*/man8/update-alternatives.8
rm -rf %{buildroot}%{_datadir}/polkit-1/actions/org.dpkg.pkexec.update-alternatives.policy
# locales
%find_lang %{name}
%find_lang dselect
%find_lang dpkg-dev
cat dselect.lang dpkg-dev.lang >> %{name}.lang
# extras
install -m 755 %{SOURCE3} %{buildroot}%{_bindir}
%check
%make_build check
%post
cd %{_localstatedir}/lib/dpkg
for f in diversions statoverride status ; do
[ ! -f $f ] && touch $f
done
exit 0
%files lang -f %{name}.lang
%{_mandir}/??/man*/*
%files
%license COPYING
%{_docdir}/%{name}
%{_mandir}/man*/*
%exclude %{_mandir}/man*/update-alternatives*
%dir %{_sysconfdir}/dpkg
%config(noreplace) %{_sysconfdir}/dpkg/*
%{_bindir}/*
%{_sbindir}/*
%{_libexecdir}/dpkg
%{_datadir}/dpkg
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/vendor-completions
%{_datadir}/zsh/vendor-completions/_dpkg-parsechangelog
%{_localstatedir}/lib/dpkg
%{perl_vendorlib}/Dpkg
%{perl_vendorlib}/Dpkg.pm
%{perl_vendorlib}/Dselect
%files devel
%{_datadir}/aclocal/*.m4
%{_libdir}/libdpkg.a
%{_libdir}/libdpkg.la
%{_libdir}/pkgconfig/libdpkg.pc
%{_includedir}/dpkg
%changelog