From 5cba02f54ba9c52a833635c2826fbfa325a34237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20=E3=83=86=E3=82=A3=E3=83=93=E3=83=84?= Date: Fri, 19 Feb 2010 19:12:32 +0000 Subject: [PATCH 001/102] Initialize branch EL-5 for dpkg --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..42f697a --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-5 From 369bdc7e78569fdc3771dcf2ad232eeb4d46914c Mon Sep 17 00:00:00 2001 From: topdog Date: Sat, 20 Feb 2010 06:01:41 +0000 Subject: [PATCH 002/102] - initial import --- .cvsignore | 1 + dpkg-change-libdir-path.patch | 268 ++++++++++++++++++++++++++++++++++ dpkg.archtable | 29 ++++ dpkg.spec | 235 +++++++++++++++++++++++++++++ import.log | 1 + sources | 1 + 6 files changed, 535 insertions(+) create mode 100644 dpkg-change-libdir-path.patch create mode 100644 dpkg.archtable create mode 100644 dpkg.spec create mode 100644 import.log diff --git a/.cvsignore b/.cvsignore index e69de29..c2fffab 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +dpkg_1.15.5.6.tar.bz2 diff --git a/dpkg-change-libdir-path.patch b/dpkg-change-libdir-path.patch new file mode 100644 index 0000000..0f1d856 --- /dev/null +++ b/dpkg-change-libdir-path.patch @@ -0,0 +1,268 @@ +diff -ruN dpkg-1.15.5.6.orig/dselect/Makefile.in dpkg-1.15.5.6/dselect/Makefile.in +--- dpkg-1.15.5.6.orig/dselect/Makefile.in 2010-01-08 20:02:49.000000000 +0200 ++++ dpkg-1.15.5.6/dselect/Makefile.in 2010-02-14 10:11:43.052023614 +0200 +@@ -276,7 +276,7 @@ + AM_CPPFLAGS = \ + -DLOCALEDIR=\"$(localedir)\" \ + -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \ +- -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ ++ -DLOCALLIBDIR=\"/usr/local/share/dpkg\" \ + -idirafter $(top_srcdir)/lib/compat \ + -iquote $(builddir) \ + -I$(top_builddir) \ +diff -ruN dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm +--- dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm 2010-02-14 09:16:24.669895188 +0200 +@@ -57,12 +57,12 @@ + } + + sub view_mirrors { +- if (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt') { +- system('/usr/bin/pager', '/usr/lib/dpkg/methods/ftp/README.mirrors.txt'); +- } elsif (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz') { +- system('gzip -dc /usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); ++ if (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt') { ++ system('/usr/bin/pager', '/usr/share/dpkg/methods/ftp/README.mirrors.txt'); ++ } elsif (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt.gz') { ++ system('gzip -dc /usr/share/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); + } else { +- print "/usr/lib/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; ++ print "/usr/share/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; + } + } + +diff -ruN dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 2010-02-14 09:22:07.409881825 +0200 +@@ -30,8 +30,8 @@ + \fB\-L\fP\fIlibverzeichnis\fP + Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser\-Skripten + durchsucht werden soll. Diese Verzeichnis wird vor den +-Standardverzeichnissen (derzeit \fB/usr/local/lib/dpkg/parsechangelog\fP und +-\fB/usr/lib/dpkg/parsechangelog\fP) durchsucht. ++Standardverzeichnissen (derzeit \fB/usr/local/share/dpkg/parsechangelog\fP und ++\fB/usr/share/dpkg/parsechangelog\fP) durchsucht. + .TP + \fB\-h\fP, \fB\-\-help\fP + Zeige den Bedienungshinweis und beende. +diff -ruN dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/man/dpkg-parsechangelog.1 2010-02-14 09:17:34.013861295 +0200 +@@ -28,8 +28,8 @@ + Specify an additional directory to search for parser scripts. + This directory is searched before the default directories + which are currently +-.BR /usr/local/lib/dpkg/parsechangelog " and " +-.BR /usr/lib/dpkg/parsechangelog . ++.BR /usr/share/dpkg/parsechangelog " and " ++.BR /usr/local/share/dpkg/parsechangelog . + .TP + .BR \-h ", " \-\-help + Show the usage message and exit. +diff -ruN dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 2010-02-14 09:22:29.321880079 +0200 +@@ -29,8 +29,8 @@ + \fB\-L\fP\fIrep_lib\fP + Spécifie un répertoire supplémentaire pour la recherche de scripts + d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui +-sont \fB/usr/local/lib/dpkg/parsechangelog\fP et +-\fB/usr/lib/dpkg/parsechangelog\fP. ++sont \fB/usr/local/share/dpkg/parsechangelog\fP et ++\fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Affiche un message d'aide puis quitte. +diff -ruN dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 2010-02-14 09:21:02.338880496 +0200 +@@ -29,8 +29,8 @@ + \fB\-L\fP\fIkatalog\-lib\fP + Okre¶la dodatkowy katalog, w którym bêd± wyszukiwane skrypty + parsera. Katalog ten jest przeszukiwany przed domy¶lnymi katalogami, którymi +-obecnie s± \fB/usr/local/lib/dpkg/parsechangelog\fP oraz +-\fB/usr/lib/dpkg/parsechangelog\fP. ++obecnie s± \fB/usr/local/share/dpkg/parsechangelog\fP oraz ++\fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Wy¶wietla informacjê o u¿ytkowaniu i koñczy dzia³anie. +diff -ruN dpkg-1.15.5.6.orig/man/po/de.po dpkg-1.15.5.6/man/po/de.po +--- dpkg-1.15.5.6.orig/man/po/de.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/de.po 2010-02-14 09:26:20.671868793 +0200 +@@ -7747,12 +7747,12 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser-Skripten " + "durchsucht werden soll. Diese Verzeichnis wird vor den " +-"Standardverzeichnissen (derzeit B und B) durchsucht." ++"Standardverzeichnissen (derzeit B und B) durchsucht." + + #. type: SS + #: dpkg-parsechangelog.1:39 +diff -ruN dpkg-1.15.5.6.orig/man/po/dpkg-man.pot dpkg-1.15.5.6/man/po/dpkg-man.pot +--- dpkg-1.15.5.6.orig/man/po/dpkg-man.pot 2010-01-08 19:23:01.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/dpkg-man.pot 2010-02-14 09:30:59.909878930 +0200 +@@ -6216,7 +6216,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently " +-"B and B." ++"B and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/es.po dpkg-1.15.5.6/man/po/es.po +--- dpkg-1.15.5.6.orig/man/po/es.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/es.po 2010-02-14 09:30:16.053872999 +0200 +@@ -7517,7 +7517,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/fr.po dpkg-1.15.5.6/man/po/fr.po +--- dpkg-1.15.5.6.orig/man/po/fr.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/fr.po 2010-02-14 09:24:19.351874142 +0200 +@@ -7737,11 +7737,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Spécifie un répertoire supplémentaire pour la recherche de scripts " + "d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui " +-"sont B et B et B." + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/hu.po dpkg-1.15.5.6/man/po/hu.po +--- dpkg-1.15.5.6.orig/man/po/hu.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/hu.po 2010-02-14 09:26:50.311874455 +0200 +@@ -6542,7 +6542,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/ja.po dpkg-1.15.5.6/man/po/ja.po +--- dpkg-1.15.5.6.orig/man/po/ja.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/ja.po 2010-02-14 09:28:46.064874305 +0200 +@@ -7055,7 +7055,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/pl.po dpkg-1.15.5.6/man/po/pl.po +--- dpkg-1.15.5.6.orig/man/po/pl.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/pl.po 2010-02-14 09:27:38.024873694 +0200 +@@ -7819,11 +7819,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "OkreÅ›la dodatkowy katalog, w którym bÄ™dÄ… wyszukiwane skrypty parsera. " + "Katalog ten jest przeszukiwany przed domyÅ›lnymi katalogami, którymi obecnie " +-"sÄ… B oraz B oraz B." + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/pt_BR.po dpkg-1.15.5.6/man/po/pt_BR.po +--- dpkg-1.15.5.6.orig/man/po/pt_BR.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/pt_BR.po 2010-02-14 09:28:12.583874117 +0200 +@@ -6687,7 +6687,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/ru.po dpkg-1.15.5.6/man/po/ru.po +--- dpkg-1.15.5.6.orig/man/po/ru.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/ru.po 2010-02-14 09:25:17.556873843 +0200 +@@ -6823,7 +6823,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/sv.po dpkg-1.15.5.6/man/po/sv.po +--- dpkg-1.15.5.6.orig/man/po/sv.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/sv.po 2010-02-14 09:29:32.735874132 +0200 +@@ -7552,11 +7552,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks " +-"genom innan standardkatalogerna, vilka för närvarande är B och B." ++"genom innan standardkatalogerna, vilka för närvarande är B och B." + + #. type: SS + #: dpkg-parsechangelog.1:39 +diff -ruN dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 2010-02-14 09:22:54.488880085 +0200 +@@ -29,7 +29,7 @@ + \fB\-L\fP\fIbibliotekskatalog\fP + Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks + genom innan standardkatalogerna, vilka för närvarande är +-\fB/usr/local/lib/dpkg/parsechangelog\fP och \fB/usr/lib/dpkg/parsechangelog\fP. ++\fB/usr/local/share/dpkg/parsechangelog\fP och \fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Visar hjälpskärm och avslutar. +diff -ruN dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm +--- dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm 2010-02-14 09:14:27.550879827 +0200 +@@ -50,7 +50,7 @@ + + The parsing itself is done by an external program (searched in the + following list of directories: $opt{libdir}, +-/usr/local/lib/dpkg/parsechangelog, /usr/lib/dpkg/parsechangelog) That ++/usr/local/share/dpkg/parsechangelogusr) That + program is named according to the format that it's able to parse. By + default it's either "debian" or the format name lookep up in the 40 last + lines of the changelog itself (extracted with this perl regular expression +@@ -70,9 +70,8 @@ + + sub changelog_parse { + my (%options) = @_; +- my @parserpath = ("/usr/local/lib/dpkg/parsechangelog", +- "$dpkglibdir/parsechangelog", +- "/usr/lib/dpkg/parsechangelog"); ++ my @parserpath = ( "$dpkglibdir/parsechangelog", ++ "/usr/local/share/dpkg/parsechangelog"); + my $format = "debian"; + my $changelogfile = "debian/changelog"; + my $force = 0; diff --git a/dpkg.archtable b/dpkg.archtable new file mode 100644 index 0000000..a50328b --- /dev/null +++ b/dpkg.archtable @@ -0,0 +1,29 @@ +# This file contains the list of architecture names in Debian's ‘sid’ +# distribution. +# +# Architecture names are formed as a combination of the system name +# (from ostable) and CPU name (from cputable) after mapping from +# the Debian triplet (from triplettable). Support for new +# architectures in dpkg is added in those files, architecture names +# are only added to this file when added to the distribution. +# +# Column 1 is present for historical reasons only, and should be ignored. +# Column 2 contains the Debian name for the architecture, which is returned +# by ‘dpkg --print-architecture’. +# +# +i486-linux-gnu i386 +ia64-linux-gnu ia64 +alpha-linux-gnu alpha +x86_64-linux-gnu amd64 +arm-linux-gnu arm +arm-linux-gnueabi armel +hppa-linux-gnu hppa +mips-linux-gnu mips +mipsel-linux-gnu mipsel +powerpc-linux-gnu powerpc +s390-linux-gnu s390 +sparc-linux-gnu sparc +i486-gnu hurd-i386 +i486-kfreebsd-gnu kfreebsd-i386 +x86_64-kfreebsd-gnu kfreebsd-amd64 diff --git a/dpkg.spec b/dpkg.spec new file mode 100644 index 0000000..9ca4d98 --- /dev/null +++ b/dpkg.spec @@ -0,0 +1,235 @@ +Name: dpkg +Version: 1.15.5.6 +Release: 3%{?dist} +Summary: Package maintenance system for Debian Linux +Group: System Environment/Base +# The entire source code is GPLv2+ with exception of the following +# lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain +# lib/dpkg/showpkg.c, dselect/methods/multicd, lib/dpkg/utils.c, lib/dpkg/showpkg.c - GPLv2 +# dselect/methods/ftp - GPL no version info +# scripts/Dpkg/Gettext.pm - BSD +# lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+ +License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD +URL: http://packages.debian.org/unstable/admin/dpkg +Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.bz2 +# obtained from dpkg-source -x dpkg_1.15.5.6.dsc +Source1: dpkg.archtable +# Fedora specific patch to store files under /usr/share/dpkg, not these are not binary +# libs. and set user search path to /usr/local/share/dpkg +Patch1: dpkg-change-libdir-path.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel + +%description + +This package contains the tools (including dpkg-source) required +to unpack, build and upload Debian source packages. + +This package also contains the programs dpkg which used to handle the +installation and removal of packages on a Debian system. + +This package also contains dselect, an interface for managing the +installation and removal of packages on the system. + +dpkg and dselect will certainly be non-functional on a rpm-based system +because packages dependencies will likely be unmet. + +%package devel +Summary: Debian package development tools +Group: Development/System +Requires: %{name} = %{version}-%{release} +Requires: perl, patch, make, binutils, bzip2, lzma +BuildArch: noarch + +%description devel +This package provides the development tools (including dpkg-source). +Required to unpack, build and upload Debian source packages + + +%package -n dselect +Summary: Debian package management front-end +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description -n dselect +dselect is a high-level interface for the installation/removal of debs . + +%prep +%setup -q + +%patch1 -p1 + +# Filter unwanted Requires: +cat << \EOF > %{name}-req +#!/bin/sh +%{__perl_requires} $* |\ + sed -e '/perl(Dselect::Ftp)/d' -e '/perl(extra)/d' -e '/perl(file)/d' -e '/perl(dpkg-gettext.pl)/d' -e '/perl(controllib.pl)/d' -e '/perl(in)/d' +EOF + +%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req +chmod +x %{__perl_requires} + +%build +%configure --without-start-stop-daemon \ + --disable-linker-optimisations \ + --with-admindir=%{_localstatedir}/lib/dpkg \ + --libdir=%{_datadir} \ + --with-selinux \ + --with-zlib \ + --with-bz2 \ + --disable-silent-rules + +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +install -pm0644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable + +%find_lang dpkg +%find_lang dpkg-dev +%find_lang dselect + +# fedora has its own implementation +rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files -f dpkg.lang +%defattr(-,root,root,-) +%doc debian/changelog README AUTHORS COPYING THANKS TODO +%dir %{_sysconfdir}/dpkg +%{_bindir}/dpkg +%{_bindir}/dpkg-deb +%{_bindir}/dpkg-query +%{_bindir}/dpkg-split +%{_bindir}/dpkg-trigger +%{_bindir}/dpkg-divert +%{_bindir}/dpkg-statoverride +%{_sbindir}/* +%dir %{_datadir}/dpkg +%{_datadir}/dpkg/mksplit +%{_datadir}/dpkg/archtable +%{_datadir}/dpkg/cputable +%{_datadir}/dpkg/ostable +%{_datadir}/dpkg/triplettable +%{perl_vendorlib}/Dpkg.pm +%dir %{perl_vendorlib}/Dpkg +%{perl_vendorlib}/Dpkg/Gettext.pm +%{_mandir}/man1/dpkg-deb.1.gz +%{_mandir}/man1/dpkg-query.1.gz +%{_mandir}/man1/dpkg-split.1.gz +%{_mandir}/man1/dpkg-trigger.1.gz +%{_mandir}/man1/dpkg.1.gz +%{_mandir}/man5/dpkg.cfg.5.gz +%{_mandir}/man8/dpkg-divert.8.gz +%{_mandir}/man8/dpkg-statoverride.8.gz +#fedora has own implemenation +%exclude %{_sbindir}/install-info +#fedora has own implemenation +%exclude %{_mandir}/man8/update-alternatives.8.gz + +%files devel -f dpkg-dev.lang +%defattr(-,root,root,-) +%doc doc/README.api +%{_bindir}/dpkg-architecture +%{_bindir}/dpkg-buildpackage +%{_bindir}/dpkg-checkbuilddeps +%{_bindir}/dpkg-distaddfile +%{_bindir}/dpkg-genchanges +%{_bindir}/dpkg-gencontrol +%{_bindir}/dpkg-gensymbols +%{_bindir}/dpkg-name +%{_bindir}/dpkg-parsechangelog +%{_bindir}/dpkg-scanpackages +%{_bindir}/dpkg-scansources +%{_bindir}/dpkg-shlibdeps +%{_bindir}/dpkg-source +%{_bindir}/dpkg-vendor +%dir %{_datadir}/dpkg/parsechangelog +%{_datadir}/dpkg/parsechangelog/* +%exclude %{perl_vendorlib}/Dpkg/Gettext.pm +%{perl_vendorlib}/Dpkg/*.pm +%{perl_vendorlib}/Dpkg/Changelog +%{perl_vendorlib}/Dpkg/Shlibs +%{perl_vendorlib}/Dpkg/Source +%{perl_vendorlib}/Dpkg/Vendor +%{perl_vendorlib}/Dpkg/Control +%{_mandir}/man1/dpkg-architecture.1.gz +%{_mandir}/man1/dpkg-buildpackage.1.gz +%{_mandir}/man1/dpkg-checkbuilddeps.1.gz +%{_mandir}/man1/dpkg-distaddfile.1.gz +%{_mandir}/man1/dpkg-genchanges.1.gz +%{_mandir}/man1/dpkg-gencontrol.1.gz +%{_mandir}/man1/dpkg-gensymbols.1.gz +%{_mandir}/man1/dpkg-name.1.gz +%{_mandir}/man1/dpkg-parsechangelog.1.gz +%{_mandir}/man1/dpkg-scanpackages.1.gz +%{_mandir}/man1/dpkg-scansources.1.gz +%{_mandir}/man1/dpkg-shlibdeps.1.gz +%{_mandir}/man1/dpkg-source.1.gz +%{_mandir}/man1/dpkg-vendor.1.gz +%{_mandir}/man5/deb-control.5.gz +%{_mandir}/man5/deb-old.5.gz +%{_mandir}/man5/deb-override.5.gz +%{_mandir}/man5/deb-extra-override.5.gz +%{_mandir}/man5/deb-shlibs.5.gz +%{_mandir}/man5/deb-substvars.5.gz +%{_mandir}/man5/deb-symbols.5.gz +%{_mandir}/man5/deb-triggers.5.gz +%{_mandir}/man5/deb-version.5.gz +%{_mandir}/man5/deb.5.gz + + +%files -n dselect -f dselect.lang +%defattr(-,root,root,-) +%doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt +%{_bindir}/dselect +%{perl_vendorlib}/Debian +%{_datadir}/dpkg/methods +%{_mandir}/man*/dselect*.gz + + + +%changelog +* Mon Feb 15 2010 Andrew Colin Kissa - 1.15.5.6-3 +- review changes + +* Sun Feb 14 2010 Andrew Colin Kissa - 1.15.5.6-2 +- review changes + +* Sat Feb 13 2010 Andrew Colin Kissa - 1.15.5.6-1 +- Upgrade to latest upstream +- review changes + +* Tue Nov 10 2009 Andrew Colin Kissa - 1.15.4.1-1 +- Upgrade to latest upstream +- review changes + +* Tue Dec 30 2008 Leigh Scott - 1.14.23-3 +- more review changes + +* Mon Dec 15 2008 Leigh Scott - 1.14.23-1 +- bump version and make some of the review changes + +* Tue Aug 19 2008 Leigh Scott - 1.14.20-5 +- made changes for review + +* Thu Jul 31 2008 Leigh Scott - 1.14.20-4 +- Change release to -4 as server refused -3 + +* Thu Jul 31 2008 Leigh Scott - 1.14.20-3 +- split the package into dkpg, dpkg-dev & dselect + +* Tue Jul 29 2008 Leigh Scott - 1.14.20-2 +- recode man files to UTF8 + +* Tue Jul 29 2008 Leigh Scott - 1.14.20-1 +- Rebuild ans add build requires ncurses-devel + +* Thu Jul 19 2007 Patrice Dumas - 1.14.5-1 +- initial packaging diff --git a/import.log b/import.log new file mode 100644 index 0000000..6818175 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +dpkg-1_15_5_6-3_fc12:HEAD:dpkg-1.15.5.6-3.fc12.src.rpm:1266645624 diff --git a/sources b/sources index e69de29..a8b1462 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4dcb0de9af234d16a62272bcc61b8873 dpkg_1.15.5.6.tar.bz2 From bce6e7daa6cb7243a659330a3e7204993407e4e0 Mon Sep 17 00:00:00 2001 From: topdog Date: Sat, 20 Feb 2010 06:04:49 +0000 Subject: [PATCH 003/102] - initial import --- .cvsignore | 1 + dpkg-change-libdir-path.patch | 268 ++++++++++++++++++++++++++++++++++ dpkg.archtable | 29 ++++ dpkg.spec | 235 +++++++++++++++++++++++++++++ import.log | 1 + sources | 1 + 6 files changed, 535 insertions(+) create mode 100644 dpkg-change-libdir-path.patch create mode 100644 dpkg.archtable create mode 100644 dpkg.spec create mode 100644 import.log diff --git a/.cvsignore b/.cvsignore index e69de29..c2fffab 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +dpkg_1.15.5.6.tar.bz2 diff --git a/dpkg-change-libdir-path.patch b/dpkg-change-libdir-path.patch new file mode 100644 index 0000000..0f1d856 --- /dev/null +++ b/dpkg-change-libdir-path.patch @@ -0,0 +1,268 @@ +diff -ruN dpkg-1.15.5.6.orig/dselect/Makefile.in dpkg-1.15.5.6/dselect/Makefile.in +--- dpkg-1.15.5.6.orig/dselect/Makefile.in 2010-01-08 20:02:49.000000000 +0200 ++++ dpkg-1.15.5.6/dselect/Makefile.in 2010-02-14 10:11:43.052023614 +0200 +@@ -276,7 +276,7 @@ + AM_CPPFLAGS = \ + -DLOCALEDIR=\"$(localedir)\" \ + -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \ +- -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ ++ -DLOCALLIBDIR=\"/usr/local/share/dpkg\" \ + -idirafter $(top_srcdir)/lib/compat \ + -iquote $(builddir) \ + -I$(top_builddir) \ +diff -ruN dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm +--- dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm 2010-02-14 09:16:24.669895188 +0200 +@@ -57,12 +57,12 @@ + } + + sub view_mirrors { +- if (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt') { +- system('/usr/bin/pager', '/usr/lib/dpkg/methods/ftp/README.mirrors.txt'); +- } elsif (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz') { +- system('gzip -dc /usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); ++ if (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt') { ++ system('/usr/bin/pager', '/usr/share/dpkg/methods/ftp/README.mirrors.txt'); ++ } elsif (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt.gz') { ++ system('gzip -dc /usr/share/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); + } else { +- print "/usr/lib/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; ++ print "/usr/share/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; + } + } + +diff -ruN dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 2010-02-14 09:22:07.409881825 +0200 +@@ -30,8 +30,8 @@ + \fB\-L\fP\fIlibverzeichnis\fP + Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser\-Skripten + durchsucht werden soll. Diese Verzeichnis wird vor den +-Standardverzeichnissen (derzeit \fB/usr/local/lib/dpkg/parsechangelog\fP und +-\fB/usr/lib/dpkg/parsechangelog\fP) durchsucht. ++Standardverzeichnissen (derzeit \fB/usr/local/share/dpkg/parsechangelog\fP und ++\fB/usr/share/dpkg/parsechangelog\fP) durchsucht. + .TP + \fB\-h\fP, \fB\-\-help\fP + Zeige den Bedienungshinweis und beende. +diff -ruN dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/man/dpkg-parsechangelog.1 2010-02-14 09:17:34.013861295 +0200 +@@ -28,8 +28,8 @@ + Specify an additional directory to search for parser scripts. + This directory is searched before the default directories + which are currently +-.BR /usr/local/lib/dpkg/parsechangelog " and " +-.BR /usr/lib/dpkg/parsechangelog . ++.BR /usr/share/dpkg/parsechangelog " and " ++.BR /usr/local/share/dpkg/parsechangelog . + .TP + .BR \-h ", " \-\-help + Show the usage message and exit. +diff -ruN dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 2010-02-14 09:22:29.321880079 +0200 +@@ -29,8 +29,8 @@ + \fB\-L\fP\fIrep_lib\fP + Spécifie un répertoire supplémentaire pour la recherche de scripts + d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui +-sont \fB/usr/local/lib/dpkg/parsechangelog\fP et +-\fB/usr/lib/dpkg/parsechangelog\fP. ++sont \fB/usr/local/share/dpkg/parsechangelog\fP et ++\fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Affiche un message d'aide puis quitte. +diff -ruN dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 2010-02-14 09:21:02.338880496 +0200 +@@ -29,8 +29,8 @@ + \fB\-L\fP\fIkatalog\-lib\fP + Okre¶la dodatkowy katalog, w którym bêd± wyszukiwane skrypty + parsera. Katalog ten jest przeszukiwany przed domy¶lnymi katalogami, którymi +-obecnie s± \fB/usr/local/lib/dpkg/parsechangelog\fP oraz +-\fB/usr/lib/dpkg/parsechangelog\fP. ++obecnie s± \fB/usr/local/share/dpkg/parsechangelog\fP oraz ++\fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Wy¶wietla informacjê o u¿ytkowaniu i koñczy dzia³anie. +diff -ruN dpkg-1.15.5.6.orig/man/po/de.po dpkg-1.15.5.6/man/po/de.po +--- dpkg-1.15.5.6.orig/man/po/de.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/de.po 2010-02-14 09:26:20.671868793 +0200 +@@ -7747,12 +7747,12 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser-Skripten " + "durchsucht werden soll. Diese Verzeichnis wird vor den " +-"Standardverzeichnissen (derzeit B und B) durchsucht." ++"Standardverzeichnissen (derzeit B und B) durchsucht." + + #. type: SS + #: dpkg-parsechangelog.1:39 +diff -ruN dpkg-1.15.5.6.orig/man/po/dpkg-man.pot dpkg-1.15.5.6/man/po/dpkg-man.pot +--- dpkg-1.15.5.6.orig/man/po/dpkg-man.pot 2010-01-08 19:23:01.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/dpkg-man.pot 2010-02-14 09:30:59.909878930 +0200 +@@ -6216,7 +6216,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently " +-"B and B." ++"B and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/es.po dpkg-1.15.5.6/man/po/es.po +--- dpkg-1.15.5.6.orig/man/po/es.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/es.po 2010-02-14 09:30:16.053872999 +0200 +@@ -7517,7 +7517,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/fr.po dpkg-1.15.5.6/man/po/fr.po +--- dpkg-1.15.5.6.orig/man/po/fr.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/fr.po 2010-02-14 09:24:19.351874142 +0200 +@@ -7737,11 +7737,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Spécifie un répertoire supplémentaire pour la recherche de scripts " + "d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui " +-"sont B et B et B." + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/hu.po dpkg-1.15.5.6/man/po/hu.po +--- dpkg-1.15.5.6.orig/man/po/hu.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/hu.po 2010-02-14 09:26:50.311874455 +0200 +@@ -6542,7 +6542,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/ja.po dpkg-1.15.5.6/man/po/ja.po +--- dpkg-1.15.5.6.orig/man/po/ja.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/ja.po 2010-02-14 09:28:46.064874305 +0200 +@@ -7055,7 +7055,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/pl.po dpkg-1.15.5.6/man/po/pl.po +--- dpkg-1.15.5.6.orig/man/po/pl.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/pl.po 2010-02-14 09:27:38.024873694 +0200 +@@ -7819,11 +7819,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "OkreÅ›la dodatkowy katalog, w którym bÄ™dÄ… wyszukiwane skrypty parsera. " + "Katalog ten jest przeszukiwany przed domyÅ›lnymi katalogami, którymi obecnie " +-"sÄ… B oraz B oraz B." + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/pt_BR.po dpkg-1.15.5.6/man/po/pt_BR.po +--- dpkg-1.15.5.6.orig/man/po/pt_BR.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/pt_BR.po 2010-02-14 09:28:12.583874117 +0200 +@@ -6687,7 +6687,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/ru.po dpkg-1.15.5.6/man/po/ru.po +--- dpkg-1.15.5.6.orig/man/po/ru.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/ru.po 2010-02-14 09:25:17.556873843 +0200 +@@ -6823,7 +6823,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/sv.po dpkg-1.15.5.6/man/po/sv.po +--- dpkg-1.15.5.6.orig/man/po/sv.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/sv.po 2010-02-14 09:29:32.735874132 +0200 +@@ -7552,11 +7552,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks " +-"genom innan standardkatalogerna, vilka för närvarande är B och B." ++"genom innan standardkatalogerna, vilka för närvarande är B och B." + + #. type: SS + #: dpkg-parsechangelog.1:39 +diff -ruN dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 2010-02-14 09:22:54.488880085 +0200 +@@ -29,7 +29,7 @@ + \fB\-L\fP\fIbibliotekskatalog\fP + Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks + genom innan standardkatalogerna, vilka för närvarande är +-\fB/usr/local/lib/dpkg/parsechangelog\fP och \fB/usr/lib/dpkg/parsechangelog\fP. ++\fB/usr/local/share/dpkg/parsechangelog\fP och \fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Visar hjälpskärm och avslutar. +diff -ruN dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm +--- dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm 2010-02-14 09:14:27.550879827 +0200 +@@ -50,7 +50,7 @@ + + The parsing itself is done by an external program (searched in the + following list of directories: $opt{libdir}, +-/usr/local/lib/dpkg/parsechangelog, /usr/lib/dpkg/parsechangelog) That ++/usr/local/share/dpkg/parsechangelogusr) That + program is named according to the format that it's able to parse. By + default it's either "debian" or the format name lookep up in the 40 last + lines of the changelog itself (extracted with this perl regular expression +@@ -70,9 +70,8 @@ + + sub changelog_parse { + my (%options) = @_; +- my @parserpath = ("/usr/local/lib/dpkg/parsechangelog", +- "$dpkglibdir/parsechangelog", +- "/usr/lib/dpkg/parsechangelog"); ++ my @parserpath = ( "$dpkglibdir/parsechangelog", ++ "/usr/local/share/dpkg/parsechangelog"); + my $format = "debian"; + my $changelogfile = "debian/changelog"; + my $force = 0; diff --git a/dpkg.archtable b/dpkg.archtable new file mode 100644 index 0000000..a50328b --- /dev/null +++ b/dpkg.archtable @@ -0,0 +1,29 @@ +# This file contains the list of architecture names in Debian's ‘sid’ +# distribution. +# +# Architecture names are formed as a combination of the system name +# (from ostable) and CPU name (from cputable) after mapping from +# the Debian triplet (from triplettable). Support for new +# architectures in dpkg is added in those files, architecture names +# are only added to this file when added to the distribution. +# +# Column 1 is present for historical reasons only, and should be ignored. +# Column 2 contains the Debian name for the architecture, which is returned +# by ‘dpkg --print-architecture’. +# +# +i486-linux-gnu i386 +ia64-linux-gnu ia64 +alpha-linux-gnu alpha +x86_64-linux-gnu amd64 +arm-linux-gnu arm +arm-linux-gnueabi armel +hppa-linux-gnu hppa +mips-linux-gnu mips +mipsel-linux-gnu mipsel +powerpc-linux-gnu powerpc +s390-linux-gnu s390 +sparc-linux-gnu sparc +i486-gnu hurd-i386 +i486-kfreebsd-gnu kfreebsd-i386 +x86_64-kfreebsd-gnu kfreebsd-amd64 diff --git a/dpkg.spec b/dpkg.spec new file mode 100644 index 0000000..9ca4d98 --- /dev/null +++ b/dpkg.spec @@ -0,0 +1,235 @@ +Name: dpkg +Version: 1.15.5.6 +Release: 3%{?dist} +Summary: Package maintenance system for Debian Linux +Group: System Environment/Base +# The entire source code is GPLv2+ with exception of the following +# lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain +# lib/dpkg/showpkg.c, dselect/methods/multicd, lib/dpkg/utils.c, lib/dpkg/showpkg.c - GPLv2 +# dselect/methods/ftp - GPL no version info +# scripts/Dpkg/Gettext.pm - BSD +# lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+ +License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD +URL: http://packages.debian.org/unstable/admin/dpkg +Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.bz2 +# obtained from dpkg-source -x dpkg_1.15.5.6.dsc +Source1: dpkg.archtable +# Fedora specific patch to store files under /usr/share/dpkg, not these are not binary +# libs. and set user search path to /usr/local/share/dpkg +Patch1: dpkg-change-libdir-path.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel + +%description + +This package contains the tools (including dpkg-source) required +to unpack, build and upload Debian source packages. + +This package also contains the programs dpkg which used to handle the +installation and removal of packages on a Debian system. + +This package also contains dselect, an interface for managing the +installation and removal of packages on the system. + +dpkg and dselect will certainly be non-functional on a rpm-based system +because packages dependencies will likely be unmet. + +%package devel +Summary: Debian package development tools +Group: Development/System +Requires: %{name} = %{version}-%{release} +Requires: perl, patch, make, binutils, bzip2, lzma +BuildArch: noarch + +%description devel +This package provides the development tools (including dpkg-source). +Required to unpack, build and upload Debian source packages + + +%package -n dselect +Summary: Debian package management front-end +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description -n dselect +dselect is a high-level interface for the installation/removal of debs . + +%prep +%setup -q + +%patch1 -p1 + +# Filter unwanted Requires: +cat << \EOF > %{name}-req +#!/bin/sh +%{__perl_requires} $* |\ + sed -e '/perl(Dselect::Ftp)/d' -e '/perl(extra)/d' -e '/perl(file)/d' -e '/perl(dpkg-gettext.pl)/d' -e '/perl(controllib.pl)/d' -e '/perl(in)/d' +EOF + +%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req +chmod +x %{__perl_requires} + +%build +%configure --without-start-stop-daemon \ + --disable-linker-optimisations \ + --with-admindir=%{_localstatedir}/lib/dpkg \ + --libdir=%{_datadir} \ + --with-selinux \ + --with-zlib \ + --with-bz2 \ + --disable-silent-rules + +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +install -pm0644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable + +%find_lang dpkg +%find_lang dpkg-dev +%find_lang dselect + +# fedora has its own implementation +rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files -f dpkg.lang +%defattr(-,root,root,-) +%doc debian/changelog README AUTHORS COPYING THANKS TODO +%dir %{_sysconfdir}/dpkg +%{_bindir}/dpkg +%{_bindir}/dpkg-deb +%{_bindir}/dpkg-query +%{_bindir}/dpkg-split +%{_bindir}/dpkg-trigger +%{_bindir}/dpkg-divert +%{_bindir}/dpkg-statoverride +%{_sbindir}/* +%dir %{_datadir}/dpkg +%{_datadir}/dpkg/mksplit +%{_datadir}/dpkg/archtable +%{_datadir}/dpkg/cputable +%{_datadir}/dpkg/ostable +%{_datadir}/dpkg/triplettable +%{perl_vendorlib}/Dpkg.pm +%dir %{perl_vendorlib}/Dpkg +%{perl_vendorlib}/Dpkg/Gettext.pm +%{_mandir}/man1/dpkg-deb.1.gz +%{_mandir}/man1/dpkg-query.1.gz +%{_mandir}/man1/dpkg-split.1.gz +%{_mandir}/man1/dpkg-trigger.1.gz +%{_mandir}/man1/dpkg.1.gz +%{_mandir}/man5/dpkg.cfg.5.gz +%{_mandir}/man8/dpkg-divert.8.gz +%{_mandir}/man8/dpkg-statoverride.8.gz +#fedora has own implemenation +%exclude %{_sbindir}/install-info +#fedora has own implemenation +%exclude %{_mandir}/man8/update-alternatives.8.gz + +%files devel -f dpkg-dev.lang +%defattr(-,root,root,-) +%doc doc/README.api +%{_bindir}/dpkg-architecture +%{_bindir}/dpkg-buildpackage +%{_bindir}/dpkg-checkbuilddeps +%{_bindir}/dpkg-distaddfile +%{_bindir}/dpkg-genchanges +%{_bindir}/dpkg-gencontrol +%{_bindir}/dpkg-gensymbols +%{_bindir}/dpkg-name +%{_bindir}/dpkg-parsechangelog +%{_bindir}/dpkg-scanpackages +%{_bindir}/dpkg-scansources +%{_bindir}/dpkg-shlibdeps +%{_bindir}/dpkg-source +%{_bindir}/dpkg-vendor +%dir %{_datadir}/dpkg/parsechangelog +%{_datadir}/dpkg/parsechangelog/* +%exclude %{perl_vendorlib}/Dpkg/Gettext.pm +%{perl_vendorlib}/Dpkg/*.pm +%{perl_vendorlib}/Dpkg/Changelog +%{perl_vendorlib}/Dpkg/Shlibs +%{perl_vendorlib}/Dpkg/Source +%{perl_vendorlib}/Dpkg/Vendor +%{perl_vendorlib}/Dpkg/Control +%{_mandir}/man1/dpkg-architecture.1.gz +%{_mandir}/man1/dpkg-buildpackage.1.gz +%{_mandir}/man1/dpkg-checkbuilddeps.1.gz +%{_mandir}/man1/dpkg-distaddfile.1.gz +%{_mandir}/man1/dpkg-genchanges.1.gz +%{_mandir}/man1/dpkg-gencontrol.1.gz +%{_mandir}/man1/dpkg-gensymbols.1.gz +%{_mandir}/man1/dpkg-name.1.gz +%{_mandir}/man1/dpkg-parsechangelog.1.gz +%{_mandir}/man1/dpkg-scanpackages.1.gz +%{_mandir}/man1/dpkg-scansources.1.gz +%{_mandir}/man1/dpkg-shlibdeps.1.gz +%{_mandir}/man1/dpkg-source.1.gz +%{_mandir}/man1/dpkg-vendor.1.gz +%{_mandir}/man5/deb-control.5.gz +%{_mandir}/man5/deb-old.5.gz +%{_mandir}/man5/deb-override.5.gz +%{_mandir}/man5/deb-extra-override.5.gz +%{_mandir}/man5/deb-shlibs.5.gz +%{_mandir}/man5/deb-substvars.5.gz +%{_mandir}/man5/deb-symbols.5.gz +%{_mandir}/man5/deb-triggers.5.gz +%{_mandir}/man5/deb-version.5.gz +%{_mandir}/man5/deb.5.gz + + +%files -n dselect -f dselect.lang +%defattr(-,root,root,-) +%doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt +%{_bindir}/dselect +%{perl_vendorlib}/Debian +%{_datadir}/dpkg/methods +%{_mandir}/man*/dselect*.gz + + + +%changelog +* Mon Feb 15 2010 Andrew Colin Kissa - 1.15.5.6-3 +- review changes + +* Sun Feb 14 2010 Andrew Colin Kissa - 1.15.5.6-2 +- review changes + +* Sat Feb 13 2010 Andrew Colin Kissa - 1.15.5.6-1 +- Upgrade to latest upstream +- review changes + +* Tue Nov 10 2009 Andrew Colin Kissa - 1.15.4.1-1 +- Upgrade to latest upstream +- review changes + +* Tue Dec 30 2008 Leigh Scott - 1.14.23-3 +- more review changes + +* Mon Dec 15 2008 Leigh Scott - 1.14.23-1 +- bump version and make some of the review changes + +* Tue Aug 19 2008 Leigh Scott - 1.14.20-5 +- made changes for review + +* Thu Jul 31 2008 Leigh Scott - 1.14.20-4 +- Change release to -4 as server refused -3 + +* Thu Jul 31 2008 Leigh Scott - 1.14.20-3 +- split the package into dkpg, dpkg-dev & dselect + +* Tue Jul 29 2008 Leigh Scott - 1.14.20-2 +- recode man files to UTF8 + +* Tue Jul 29 2008 Leigh Scott - 1.14.20-1 +- Rebuild ans add build requires ncurses-devel + +* Thu Jul 19 2007 Patrice Dumas - 1.14.5-1 +- initial packaging diff --git a/import.log b/import.log new file mode 100644 index 0000000..18fa5ba --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +dpkg-1_15_5_6-3_fc12:EL-5:dpkg-1.15.5.6-3.fc12.src.rpm:1266645849 diff --git a/sources b/sources index e69de29..a8b1462 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4dcb0de9af234d16a62272bcc61b8873 dpkg_1.15.5.6.tar.bz2 From 5fdeb149b9e7891eb9a386dc0b4df844dfdcfb68 Mon Sep 17 00:00:00 2001 From: topdog Date: Sat, 20 Feb 2010 06:11:18 +0000 Subject: [PATCH 004/102] - initial import --- .cvsignore | 1 + dpkg-change-libdir-path.patch | 268 ++++++++++++++++++++++++++++++++++ dpkg.archtable | 29 ++++ dpkg.spec | 235 +++++++++++++++++++++++++++++ import.log | 1 + sources | 1 + 6 files changed, 535 insertions(+) create mode 100644 dpkg-change-libdir-path.patch create mode 100644 dpkg.archtable create mode 100644 dpkg.spec create mode 100644 import.log diff --git a/.cvsignore b/.cvsignore index e69de29..c2fffab 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +dpkg_1.15.5.6.tar.bz2 diff --git a/dpkg-change-libdir-path.patch b/dpkg-change-libdir-path.patch new file mode 100644 index 0000000..0f1d856 --- /dev/null +++ b/dpkg-change-libdir-path.patch @@ -0,0 +1,268 @@ +diff -ruN dpkg-1.15.5.6.orig/dselect/Makefile.in dpkg-1.15.5.6/dselect/Makefile.in +--- dpkg-1.15.5.6.orig/dselect/Makefile.in 2010-01-08 20:02:49.000000000 +0200 ++++ dpkg-1.15.5.6/dselect/Makefile.in 2010-02-14 10:11:43.052023614 +0200 +@@ -276,7 +276,7 @@ + AM_CPPFLAGS = \ + -DLOCALEDIR=\"$(localedir)\" \ + -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \ +- -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ ++ -DLOCALLIBDIR=\"/usr/local/share/dpkg\" \ + -idirafter $(top_srcdir)/lib/compat \ + -iquote $(builddir) \ + -I$(top_builddir) \ +diff -ruN dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm +--- dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm 2010-02-14 09:16:24.669895188 +0200 +@@ -57,12 +57,12 @@ + } + + sub view_mirrors { +- if (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt') { +- system('/usr/bin/pager', '/usr/lib/dpkg/methods/ftp/README.mirrors.txt'); +- } elsif (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz') { +- system('gzip -dc /usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); ++ if (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt') { ++ system('/usr/bin/pager', '/usr/share/dpkg/methods/ftp/README.mirrors.txt'); ++ } elsif (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt.gz') { ++ system('gzip -dc /usr/share/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); + } else { +- print "/usr/lib/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; ++ print "/usr/share/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; + } + } + +diff -ruN dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 2010-02-14 09:22:07.409881825 +0200 +@@ -30,8 +30,8 @@ + \fB\-L\fP\fIlibverzeichnis\fP + Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser\-Skripten + durchsucht werden soll. Diese Verzeichnis wird vor den +-Standardverzeichnissen (derzeit \fB/usr/local/lib/dpkg/parsechangelog\fP und +-\fB/usr/lib/dpkg/parsechangelog\fP) durchsucht. ++Standardverzeichnissen (derzeit \fB/usr/local/share/dpkg/parsechangelog\fP und ++\fB/usr/share/dpkg/parsechangelog\fP) durchsucht. + .TP + \fB\-h\fP, \fB\-\-help\fP + Zeige den Bedienungshinweis und beende. +diff -ruN dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/man/dpkg-parsechangelog.1 2010-02-14 09:17:34.013861295 +0200 +@@ -28,8 +28,8 @@ + Specify an additional directory to search for parser scripts. + This directory is searched before the default directories + which are currently +-.BR /usr/local/lib/dpkg/parsechangelog " and " +-.BR /usr/lib/dpkg/parsechangelog . ++.BR /usr/share/dpkg/parsechangelog " and " ++.BR /usr/local/share/dpkg/parsechangelog . + .TP + .BR \-h ", " \-\-help + Show the usage message and exit. +diff -ruN dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 2010-02-14 09:22:29.321880079 +0200 +@@ -29,8 +29,8 @@ + \fB\-L\fP\fIrep_lib\fP + Spécifie un répertoire supplémentaire pour la recherche de scripts + d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui +-sont \fB/usr/local/lib/dpkg/parsechangelog\fP et +-\fB/usr/lib/dpkg/parsechangelog\fP. ++sont \fB/usr/local/share/dpkg/parsechangelog\fP et ++\fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Affiche un message d'aide puis quitte. +diff -ruN dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 2010-02-14 09:21:02.338880496 +0200 +@@ -29,8 +29,8 @@ + \fB\-L\fP\fIkatalog\-lib\fP + Okre¶la dodatkowy katalog, w którym bêd± wyszukiwane skrypty + parsera. Katalog ten jest przeszukiwany przed domy¶lnymi katalogami, którymi +-obecnie s± \fB/usr/local/lib/dpkg/parsechangelog\fP oraz +-\fB/usr/lib/dpkg/parsechangelog\fP. ++obecnie s± \fB/usr/local/share/dpkg/parsechangelog\fP oraz ++\fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Wy¶wietla informacjê o u¿ytkowaniu i koñczy dzia³anie. +diff -ruN dpkg-1.15.5.6.orig/man/po/de.po dpkg-1.15.5.6/man/po/de.po +--- dpkg-1.15.5.6.orig/man/po/de.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/de.po 2010-02-14 09:26:20.671868793 +0200 +@@ -7747,12 +7747,12 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser-Skripten " + "durchsucht werden soll. Diese Verzeichnis wird vor den " +-"Standardverzeichnissen (derzeit B und B) durchsucht." ++"Standardverzeichnissen (derzeit B und B) durchsucht." + + #. type: SS + #: dpkg-parsechangelog.1:39 +diff -ruN dpkg-1.15.5.6.orig/man/po/dpkg-man.pot dpkg-1.15.5.6/man/po/dpkg-man.pot +--- dpkg-1.15.5.6.orig/man/po/dpkg-man.pot 2010-01-08 19:23:01.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/dpkg-man.pot 2010-02-14 09:30:59.909878930 +0200 +@@ -6216,7 +6216,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently " +-"B and B." ++"B and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/es.po dpkg-1.15.5.6/man/po/es.po +--- dpkg-1.15.5.6.orig/man/po/es.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/es.po 2010-02-14 09:30:16.053872999 +0200 +@@ -7517,7 +7517,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/fr.po dpkg-1.15.5.6/man/po/fr.po +--- dpkg-1.15.5.6.orig/man/po/fr.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/fr.po 2010-02-14 09:24:19.351874142 +0200 +@@ -7737,11 +7737,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Spécifie un répertoire supplémentaire pour la recherche de scripts " + "d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui " +-"sont B et B et B." + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/hu.po dpkg-1.15.5.6/man/po/hu.po +--- dpkg-1.15.5.6.orig/man/po/hu.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/hu.po 2010-02-14 09:26:50.311874455 +0200 +@@ -6542,7 +6542,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/ja.po dpkg-1.15.5.6/man/po/ja.po +--- dpkg-1.15.5.6.orig/man/po/ja.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/ja.po 2010-02-14 09:28:46.064874305 +0200 +@@ -7055,7 +7055,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/pl.po dpkg-1.15.5.6/man/po/pl.po +--- dpkg-1.15.5.6.orig/man/po/pl.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/pl.po 2010-02-14 09:27:38.024873694 +0200 +@@ -7819,11 +7819,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "OkreÅ›la dodatkowy katalog, w którym bÄ™dÄ… wyszukiwane skrypty parsera. " + "Katalog ten jest przeszukiwany przed domyÅ›lnymi katalogami, którymi obecnie " +-"sÄ… B oraz B oraz B." + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/pt_BR.po dpkg-1.15.5.6/man/po/pt_BR.po +--- dpkg-1.15.5.6.orig/man/po/pt_BR.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/pt_BR.po 2010-02-14 09:28:12.583874117 +0200 +@@ -6687,7 +6687,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/ru.po dpkg-1.15.5.6/man/po/ru.po +--- dpkg-1.15.5.6.orig/man/po/ru.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/ru.po 2010-02-14 09:25:17.556873843 +0200 +@@ -6823,7 +6823,7 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + + #. type: SS +diff -ruN dpkg-1.15.5.6.orig/man/po/sv.po dpkg-1.15.5.6/man/po/sv.po +--- dpkg-1.15.5.6.orig/man/po/sv.po 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/po/sv.po 2010-02-14 09:29:32.735874132 +0200 +@@ -7552,11 +7552,11 @@ + msgid "" + "Specify an additional directory to search for parser scripts. This " + "directory is searched before the default directories which are currently B and B." ++"usr/local/share/dpkg/parsechangelog> and B." + msgstr "" + "Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks " +-"genom innan standardkatalogerna, vilka för närvarande är B och B." ++"genom innan standardkatalogerna, vilka för närvarande är B och B." + + #. type: SS + #: dpkg-parsechangelog.1:39 +diff -ruN dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 +--- dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 ++++ dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 2010-02-14 09:22:54.488880085 +0200 +@@ -29,7 +29,7 @@ + \fB\-L\fP\fIbibliotekskatalog\fP + Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks + genom innan standardkatalogerna, vilka för närvarande är +-\fB/usr/local/lib/dpkg/parsechangelog\fP och \fB/usr/lib/dpkg/parsechangelog\fP. ++\fB/usr/local/share/dpkg/parsechangelog\fP och \fB/usr/share/dpkg/parsechangelog\fP. + .TP + \fB\-h\fP, \fB\-\-help\fP + Visar hjälpskärm och avslutar. +diff -ruN dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm +--- dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm 2010-01-08 10:00:34.000000000 +0200 ++++ dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm 2010-02-14 09:14:27.550879827 +0200 +@@ -50,7 +50,7 @@ + + The parsing itself is done by an external program (searched in the + following list of directories: $opt{libdir}, +-/usr/local/lib/dpkg/parsechangelog, /usr/lib/dpkg/parsechangelog) That ++/usr/local/share/dpkg/parsechangelogusr) That + program is named according to the format that it's able to parse. By + default it's either "debian" or the format name lookep up in the 40 last + lines of the changelog itself (extracted with this perl regular expression +@@ -70,9 +70,8 @@ + + sub changelog_parse { + my (%options) = @_; +- my @parserpath = ("/usr/local/lib/dpkg/parsechangelog", +- "$dpkglibdir/parsechangelog", +- "/usr/lib/dpkg/parsechangelog"); ++ my @parserpath = ( "$dpkglibdir/parsechangelog", ++ "/usr/local/share/dpkg/parsechangelog"); + my $format = "debian"; + my $changelogfile = "debian/changelog"; + my $force = 0; diff --git a/dpkg.archtable b/dpkg.archtable new file mode 100644 index 0000000..a50328b --- /dev/null +++ b/dpkg.archtable @@ -0,0 +1,29 @@ +# This file contains the list of architecture names in Debian's ‘sid’ +# distribution. +# +# Architecture names are formed as a combination of the system name +# (from ostable) and CPU name (from cputable) after mapping from +# the Debian triplet (from triplettable). Support for new +# architectures in dpkg is added in those files, architecture names +# are only added to this file when added to the distribution. +# +# Column 1 is present for historical reasons only, and should be ignored. +# Column 2 contains the Debian name for the architecture, which is returned +# by ‘dpkg --print-architecture’. +# +# +i486-linux-gnu i386 +ia64-linux-gnu ia64 +alpha-linux-gnu alpha +x86_64-linux-gnu amd64 +arm-linux-gnu arm +arm-linux-gnueabi armel +hppa-linux-gnu hppa +mips-linux-gnu mips +mipsel-linux-gnu mipsel +powerpc-linux-gnu powerpc +s390-linux-gnu s390 +sparc-linux-gnu sparc +i486-gnu hurd-i386 +i486-kfreebsd-gnu kfreebsd-i386 +x86_64-kfreebsd-gnu kfreebsd-amd64 diff --git a/dpkg.spec b/dpkg.spec new file mode 100644 index 0000000..9ca4d98 --- /dev/null +++ b/dpkg.spec @@ -0,0 +1,235 @@ +Name: dpkg +Version: 1.15.5.6 +Release: 3%{?dist} +Summary: Package maintenance system for Debian Linux +Group: System Environment/Base +# The entire source code is GPLv2+ with exception of the following +# lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain +# lib/dpkg/showpkg.c, dselect/methods/multicd, lib/dpkg/utils.c, lib/dpkg/showpkg.c - GPLv2 +# dselect/methods/ftp - GPL no version info +# scripts/Dpkg/Gettext.pm - BSD +# lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+ +License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD +URL: http://packages.debian.org/unstable/admin/dpkg +Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.bz2 +# obtained from dpkg-source -x dpkg_1.15.5.6.dsc +Source1: dpkg.archtable +# Fedora specific patch to store files under /usr/share/dpkg, not these are not binary +# libs. and set user search path to /usr/local/share/dpkg +Patch1: dpkg-change-libdir-path.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel + +%description + +This package contains the tools (including dpkg-source) required +to unpack, build and upload Debian source packages. + +This package also contains the programs dpkg which used to handle the +installation and removal of packages on a Debian system. + +This package also contains dselect, an interface for managing the +installation and removal of packages on the system. + +dpkg and dselect will certainly be non-functional on a rpm-based system +because packages dependencies will likely be unmet. + +%package devel +Summary: Debian package development tools +Group: Development/System +Requires: %{name} = %{version}-%{release} +Requires: perl, patch, make, binutils, bzip2, lzma +BuildArch: noarch + +%description devel +This package provides the development tools (including dpkg-source). +Required to unpack, build and upload Debian source packages + + +%package -n dselect +Summary: Debian package management front-end +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} + +%description -n dselect +dselect is a high-level interface for the installation/removal of debs . + +%prep +%setup -q + +%patch1 -p1 + +# Filter unwanted Requires: +cat << \EOF > %{name}-req +#!/bin/sh +%{__perl_requires} $* |\ + sed -e '/perl(Dselect::Ftp)/d' -e '/perl(extra)/d' -e '/perl(file)/d' -e '/perl(dpkg-gettext.pl)/d' -e '/perl(controllib.pl)/d' -e '/perl(in)/d' +EOF + +%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req +chmod +x %{__perl_requires} + +%build +%configure --without-start-stop-daemon \ + --disable-linker-optimisations \ + --with-admindir=%{_localstatedir}/lib/dpkg \ + --libdir=%{_datadir} \ + --with-selinux \ + --with-zlib \ + --with-bz2 \ + --disable-silent-rules + +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +install -pm0644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable + +%find_lang dpkg +%find_lang dpkg-dev +%find_lang dselect + +# fedora has its own implementation +rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives +rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files -f dpkg.lang +%defattr(-,root,root,-) +%doc debian/changelog README AUTHORS COPYING THANKS TODO +%dir %{_sysconfdir}/dpkg +%{_bindir}/dpkg +%{_bindir}/dpkg-deb +%{_bindir}/dpkg-query +%{_bindir}/dpkg-split +%{_bindir}/dpkg-trigger +%{_bindir}/dpkg-divert +%{_bindir}/dpkg-statoverride +%{_sbindir}/* +%dir %{_datadir}/dpkg +%{_datadir}/dpkg/mksplit +%{_datadir}/dpkg/archtable +%{_datadir}/dpkg/cputable +%{_datadir}/dpkg/ostable +%{_datadir}/dpkg/triplettable +%{perl_vendorlib}/Dpkg.pm +%dir %{perl_vendorlib}/Dpkg +%{perl_vendorlib}/Dpkg/Gettext.pm +%{_mandir}/man1/dpkg-deb.1.gz +%{_mandir}/man1/dpkg-query.1.gz +%{_mandir}/man1/dpkg-split.1.gz +%{_mandir}/man1/dpkg-trigger.1.gz +%{_mandir}/man1/dpkg.1.gz +%{_mandir}/man5/dpkg.cfg.5.gz +%{_mandir}/man8/dpkg-divert.8.gz +%{_mandir}/man8/dpkg-statoverride.8.gz +#fedora has own implemenation +%exclude %{_sbindir}/install-info +#fedora has own implemenation +%exclude %{_mandir}/man8/update-alternatives.8.gz + +%files devel -f dpkg-dev.lang +%defattr(-,root,root,-) +%doc doc/README.api +%{_bindir}/dpkg-architecture +%{_bindir}/dpkg-buildpackage +%{_bindir}/dpkg-checkbuilddeps +%{_bindir}/dpkg-distaddfile +%{_bindir}/dpkg-genchanges +%{_bindir}/dpkg-gencontrol +%{_bindir}/dpkg-gensymbols +%{_bindir}/dpkg-name +%{_bindir}/dpkg-parsechangelog +%{_bindir}/dpkg-scanpackages +%{_bindir}/dpkg-scansources +%{_bindir}/dpkg-shlibdeps +%{_bindir}/dpkg-source +%{_bindir}/dpkg-vendor +%dir %{_datadir}/dpkg/parsechangelog +%{_datadir}/dpkg/parsechangelog/* +%exclude %{perl_vendorlib}/Dpkg/Gettext.pm +%{perl_vendorlib}/Dpkg/*.pm +%{perl_vendorlib}/Dpkg/Changelog +%{perl_vendorlib}/Dpkg/Shlibs +%{perl_vendorlib}/Dpkg/Source +%{perl_vendorlib}/Dpkg/Vendor +%{perl_vendorlib}/Dpkg/Control +%{_mandir}/man1/dpkg-architecture.1.gz +%{_mandir}/man1/dpkg-buildpackage.1.gz +%{_mandir}/man1/dpkg-checkbuilddeps.1.gz +%{_mandir}/man1/dpkg-distaddfile.1.gz +%{_mandir}/man1/dpkg-genchanges.1.gz +%{_mandir}/man1/dpkg-gencontrol.1.gz +%{_mandir}/man1/dpkg-gensymbols.1.gz +%{_mandir}/man1/dpkg-name.1.gz +%{_mandir}/man1/dpkg-parsechangelog.1.gz +%{_mandir}/man1/dpkg-scanpackages.1.gz +%{_mandir}/man1/dpkg-scansources.1.gz +%{_mandir}/man1/dpkg-shlibdeps.1.gz +%{_mandir}/man1/dpkg-source.1.gz +%{_mandir}/man1/dpkg-vendor.1.gz +%{_mandir}/man5/deb-control.5.gz +%{_mandir}/man5/deb-old.5.gz +%{_mandir}/man5/deb-override.5.gz +%{_mandir}/man5/deb-extra-override.5.gz +%{_mandir}/man5/deb-shlibs.5.gz +%{_mandir}/man5/deb-substvars.5.gz +%{_mandir}/man5/deb-symbols.5.gz +%{_mandir}/man5/deb-triggers.5.gz +%{_mandir}/man5/deb-version.5.gz +%{_mandir}/man5/deb.5.gz + + +%files -n dselect -f dselect.lang +%defattr(-,root,root,-) +%doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt +%{_bindir}/dselect +%{perl_vendorlib}/Debian +%{_datadir}/dpkg/methods +%{_mandir}/man*/dselect*.gz + + + +%changelog +* Mon Feb 15 2010 Andrew Colin Kissa - 1.15.5.6-3 +- review changes + +* Sun Feb 14 2010 Andrew Colin Kissa - 1.15.5.6-2 +- review changes + +* Sat Feb 13 2010 Andrew Colin Kissa - 1.15.5.6-1 +- Upgrade to latest upstream +- review changes + +* Tue Nov 10 2009 Andrew Colin Kissa - 1.15.4.1-1 +- Upgrade to latest upstream +- review changes + +* Tue Dec 30 2008 Leigh Scott - 1.14.23-3 +- more review changes + +* Mon Dec 15 2008 Leigh Scott - 1.14.23-1 +- bump version and make some of the review changes + +* Tue Aug 19 2008 Leigh Scott - 1.14.20-5 +- made changes for review + +* Thu Jul 31 2008 Leigh Scott - 1.14.20-4 +- Change release to -4 as server refused -3 + +* Thu Jul 31 2008 Leigh Scott - 1.14.20-3 +- split the package into dkpg, dpkg-dev & dselect + +* Tue Jul 29 2008 Leigh Scott - 1.14.20-2 +- recode man files to UTF8 + +* Tue Jul 29 2008 Leigh Scott - 1.14.20-1 +- Rebuild ans add build requires ncurses-devel + +* Thu Jul 19 2007 Patrice Dumas - 1.14.5-1 +- initial packaging diff --git a/import.log b/import.log new file mode 100644 index 0000000..da9c9d0 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +dpkg-1_15_5_6-3_fc12:F-12:dpkg-1.15.5.6-3.fc12.src.rpm:1266646238 diff --git a/sources b/sources index e69de29..a8b1462 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4dcb0de9af234d16a62272bcc61b8873 dpkg_1.15.5.6.tar.bz2 From 63be29fb2f12d1cc2d18f2ca755e6847a69d8066 Mon Sep 17 00:00:00 2001 From: topdog Date: Thu, 11 Mar 2010 13:43:39 +0000 Subject: [PATCH 005/102] - Fix CVE-2010-0396 --- dpkg.spec | 10 ++++++- fedora-fix-CVE-2010-0396-00.patch | 43 +++++++++++++++++++++++++++++++ fedora-fix-CVE-2010-0396-01.patch | 11 ++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 fedora-fix-CVE-2010-0396-00.patch create mode 100644 fedora-fix-CVE-2010-0396-01.patch diff --git a/dpkg.spec b/dpkg.spec index 9ca4d98..01e334e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -17,6 +17,9 @@ Source1: dpkg.archtable # Fedora specific patch to store files under /usr/share/dpkg, not these are not binary # libs. and set user search path to /usr/local/share/dpkg Patch1: dpkg-change-libdir-path.patch +# Fixes CVE-2010-0396 bugzilla #572522 +Patch2: fedora-fix-CVE-2010-0396-00.patch +Patch3: fedora-fix-CVE-2010-0396-01.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -58,6 +61,8 @@ dselect is a high-level interface for the installation/removal of debs . %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -196,6 +201,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Mar 11 2010 Andrew Colin Kissa - 1.15.5.6-4 +- Fix CVE-2010-0396 + * Mon Feb 15 2010 Andrew Colin Kissa - 1.15.5.6-3 - review changes diff --git a/fedora-fix-CVE-2010-0396-00.patch b/fedora-fix-CVE-2010-0396-00.patch new file mode 100644 index 0000000..6f9fc07 --- /dev/null +++ b/fedora-fix-CVE-2010-0396-00.patch @@ -0,0 +1,43 @@ +diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm +--- a/scripts/Dpkg/Source/Patch.pm ++++ b/scripts/Dpkg/Source/Patch.pm +@@ -322,8 +322,9 @@ sub analyze { + error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); + } + $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { ++ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { + $fn = $_; ++ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; + } + if (/\.dpkg-orig$/) { + error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); +@@ -336,8 +337,9 @@ sub analyze { + error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); + } + $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { ++ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { + $fn2 = $_; ++ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; + } else { + unless (defined $fn) { + error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), +@@ -363,6 +365,17 @@ sub analyze { + if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { + $dirtocreate{$dirname} = 1; + } ++ ++ # Sanity check, refuse to patch through a symlink ++ $dirname = $fn; ++ while (1) { ++ if (-l $dirname) { ++ error(_g("diff %s modifies file %s through a symlink: %s"), ++ $diff, $fn, $dirname); ++ } ++ last unless $dirname =~ s{/[^/]+$}{}; ++ } ++ + if (-e $fn and not -f _) { + error(_g("diff `%s' patches something which is not a plain file"), $diff); + } diff --git a/fedora-fix-CVE-2010-0396-01.patch b/fedora-fix-CVE-2010-0396-01.patch new file mode 100644 index 0000000..c862e05 --- /dev/null +++ b/fedora-fix-CVE-2010-0396-01.patch @@ -0,0 +1,11 @@ +diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm +--- a/scripts/Dpkg/Source/Package/V3/quilt.pm ++++ b/scripts/Dpkg/Source/Package/V3/quilt.pm +@@ -123,6 +123,7 @@ sub read_patch_list { + } + } + next if $opts{"skip_auto"} and $_ eq $auto_patch; ++ error(_g("%s contains an insecure path: %s"), $file, $_) if m{(^|/)\.\./}; + push @patches, $_; + } + close(SERIES); From 6fffb44b1c1524a5689d497e8f5ba7be571003dd Mon Sep 17 00:00:00 2001 From: topdog Date: Thu, 11 Mar 2010 13:46:34 +0000 Subject: [PATCH 006/102] - Fix CVE-2010-0396 --- dpkg.spec | 10 ++++++- fedora-fix-CVE-2010-0396-00.patch | 43 +++++++++++++++++++++++++++++++ fedora-fix-CVE-2010-0396-01.patch | 11 ++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 fedora-fix-CVE-2010-0396-00.patch create mode 100644 fedora-fix-CVE-2010-0396-01.patch diff --git a/dpkg.spec b/dpkg.spec index 9ca4d98..01e334e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -17,6 +17,9 @@ Source1: dpkg.archtable # Fedora specific patch to store files under /usr/share/dpkg, not these are not binary # libs. and set user search path to /usr/local/share/dpkg Patch1: dpkg-change-libdir-path.patch +# Fixes CVE-2010-0396 bugzilla #572522 +Patch2: fedora-fix-CVE-2010-0396-00.patch +Patch3: fedora-fix-CVE-2010-0396-01.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -58,6 +61,8 @@ dselect is a high-level interface for the installation/removal of debs . %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -196,6 +201,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Mar 11 2010 Andrew Colin Kissa - 1.15.5.6-4 +- Fix CVE-2010-0396 + * Mon Feb 15 2010 Andrew Colin Kissa - 1.15.5.6-3 - review changes diff --git a/fedora-fix-CVE-2010-0396-00.patch b/fedora-fix-CVE-2010-0396-00.patch new file mode 100644 index 0000000..6f9fc07 --- /dev/null +++ b/fedora-fix-CVE-2010-0396-00.patch @@ -0,0 +1,43 @@ +diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm +--- a/scripts/Dpkg/Source/Patch.pm ++++ b/scripts/Dpkg/Source/Patch.pm +@@ -322,8 +322,9 @@ sub analyze { + error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); + } + $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { ++ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { + $fn = $_; ++ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; + } + if (/\.dpkg-orig$/) { + error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); +@@ -336,8 +337,9 @@ sub analyze { + error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); + } + $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { ++ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { + $fn2 = $_; ++ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; + } else { + unless (defined $fn) { + error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), +@@ -363,6 +365,17 @@ sub analyze { + if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { + $dirtocreate{$dirname} = 1; + } ++ ++ # Sanity check, refuse to patch through a symlink ++ $dirname = $fn; ++ while (1) { ++ if (-l $dirname) { ++ error(_g("diff %s modifies file %s through a symlink: %s"), ++ $diff, $fn, $dirname); ++ } ++ last unless $dirname =~ s{/[^/]+$}{}; ++ } ++ + if (-e $fn and not -f _) { + error(_g("diff `%s' patches something which is not a plain file"), $diff); + } diff --git a/fedora-fix-CVE-2010-0396-01.patch b/fedora-fix-CVE-2010-0396-01.patch new file mode 100644 index 0000000..c862e05 --- /dev/null +++ b/fedora-fix-CVE-2010-0396-01.patch @@ -0,0 +1,11 @@ +diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm +--- a/scripts/Dpkg/Source/Package/V3/quilt.pm ++++ b/scripts/Dpkg/Source/Package/V3/quilt.pm +@@ -123,6 +123,7 @@ sub read_patch_list { + } + } + next if $opts{"skip_auto"} and $_ eq $auto_patch; ++ error(_g("%s contains an insecure path: %s"), $file, $_) if m{(^|/)\.\./}; + push @patches, $_; + } + close(SERIES); From 3b70e301ba5eb8da6a561baa18e5e94e138ead7c Mon Sep 17 00:00:00 2001 From: topdog Date: Thu, 11 Mar 2010 13:47:38 +0000 Subject: [PATCH 007/102] - Fix CVE-2010-0396 --- dpkg.spec | 10 ++++++- fedora-fix-CVE-2010-0396-00.patch | 43 +++++++++++++++++++++++++++++++ fedora-fix-CVE-2010-0396-01.patch | 11 ++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 fedora-fix-CVE-2010-0396-00.patch create mode 100644 fedora-fix-CVE-2010-0396-01.patch diff --git a/dpkg.spec b/dpkg.spec index 9ca4d98..01e334e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -17,6 +17,9 @@ Source1: dpkg.archtable # Fedora specific patch to store files under /usr/share/dpkg, not these are not binary # libs. and set user search path to /usr/local/share/dpkg Patch1: dpkg-change-libdir-path.patch +# Fixes CVE-2010-0396 bugzilla #572522 +Patch2: fedora-fix-CVE-2010-0396-00.patch +Patch3: fedora-fix-CVE-2010-0396-01.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -58,6 +61,8 @@ dselect is a high-level interface for the installation/removal of debs . %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -196,6 +201,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Mar 11 2010 Andrew Colin Kissa - 1.15.5.6-4 +- Fix CVE-2010-0396 + * Mon Feb 15 2010 Andrew Colin Kissa - 1.15.5.6-3 - review changes diff --git a/fedora-fix-CVE-2010-0396-00.patch b/fedora-fix-CVE-2010-0396-00.patch new file mode 100644 index 0000000..6f9fc07 --- /dev/null +++ b/fedora-fix-CVE-2010-0396-00.patch @@ -0,0 +1,43 @@ +diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm +--- a/scripts/Dpkg/Source/Patch.pm ++++ b/scripts/Dpkg/Source/Patch.pm +@@ -322,8 +322,9 @@ sub analyze { + error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); + } + $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { ++ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { + $fn = $_; ++ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; + } + if (/\.dpkg-orig$/) { + error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); +@@ -336,8 +337,9 @@ sub analyze { + error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); + } + $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { ++ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { + $fn2 = $_; ++ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; + } else { + unless (defined $fn) { + error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), +@@ -363,6 +365,17 @@ sub analyze { + if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { + $dirtocreate{$dirname} = 1; + } ++ ++ # Sanity check, refuse to patch through a symlink ++ $dirname = $fn; ++ while (1) { ++ if (-l $dirname) { ++ error(_g("diff %s modifies file %s through a symlink: %s"), ++ $diff, $fn, $dirname); ++ } ++ last unless $dirname =~ s{/[^/]+$}{}; ++ } ++ + if (-e $fn and not -f _) { + error(_g("diff `%s' patches something which is not a plain file"), $diff); + } diff --git a/fedora-fix-CVE-2010-0396-01.patch b/fedora-fix-CVE-2010-0396-01.patch new file mode 100644 index 0000000..c862e05 --- /dev/null +++ b/fedora-fix-CVE-2010-0396-01.patch @@ -0,0 +1,11 @@ +diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm +--- a/scripts/Dpkg/Source/Package/V3/quilt.pm ++++ b/scripts/Dpkg/Source/Package/V3/quilt.pm +@@ -123,6 +123,7 @@ sub read_patch_list { + } + } + next if $opts{"skip_auto"} and $_ eq $auto_patch; ++ error(_g("%s contains an insecure path: %s"), $file, $_) if m{(^|/)\.\./}; + push @patches, $_; + } + close(SERIES); From 6594d26789fba217e1ae528d1527c5f0b07fb80e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 8 May 2010 01:47:45 +0000 Subject: [PATCH 008/102] Initialize branch EL-6 for dpkg --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..46381b9 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-6 From 991f106faf44c9fc8c90e44ea93687fdc842b333 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 13:14:01 +0000 Subject: [PATCH 009/102] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 5c9af32..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: dpkg -# $Id$ -NAME := dpkg -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 6818175..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -dpkg-1_15_5_6-3_fc12:HEAD:dpkg-1.15.5.6-3.fc12.src.rpm:1266645624 From e17117f38d6d9c7c6aae0c97994f0d2618ed0660 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 13:14:01 +0000 Subject: [PATCH 010/102] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 1 - 4 files changed, 23 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 5c9af32..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: dpkg -# $Id$ -NAME := dpkg -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 46381b9..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-6 diff --git a/import.log b/import.log deleted file mode 100644 index da9c9d0..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -dpkg-1_15_5_6-3_fc12:F-12:dpkg-1.15.5.6-3.fc12.src.rpm:1266646238 From df7e220fbb16cef85ad1f042ac40be0218731137 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 13:14:01 +0000 Subject: [PATCH 011/102] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 1 - 4 files changed, 23 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 5c9af32..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: dpkg -# $Id$ -NAME := dpkg -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 42f697a..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-5 diff --git a/import.log b/import.log deleted file mode 100644 index 18fa5ba..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -dpkg-1_15_5_6-3_fc12:EL-5:dpkg-1.15.5.6-3.fc12.src.rpm:1266645849 From 2f5aefdad33489ceb6f7e79306928fd0da180b22 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Ergo Project)" Date: Sun, 17 Oct 2010 12:30:57 +0100 Subject: [PATCH 012/102] Add patch for #642160 (empty argv to dpkg --print-architecture) --- fedora-bug642160-empty-argv.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 fedora-bug642160-empty-argv.patch diff --git a/fedora-bug642160-empty-argv.patch b/fedora-bug642160-empty-argv.patch new file mode 100644 index 0000000..86528a3 --- /dev/null +++ b/fedora-bug642160-empty-argv.patch @@ -0,0 +1,15 @@ +diff -ur dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm dpkg-1.15.5.6/scripts/Dpkg/Arch.pm +--- dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm 2010-01-08 08:00:34.000000000 +0000 ++++ dpkg-1.15.5.6/scripts/Dpkg/Arch.pm 2010-10-17 12:29:46.916000478 +0100 +@@ -47,8 +47,9 @@ + return $build_arch if defined $build_arch; + + my $build_arch = `dpkg --print-architecture`; +- # FIXME: Handle bootstrapping +- syserr("dpkg --print-architecture failed") if $? >> 8; ++ if ($? >> 8 || $build_arch =~ /^\s*$/) { ++ $build_arch = get_raw_host_arch(); ++ } + + chomp $build_arch; + return $build_arch; From 9f0b7be27a08c70bf7c02bf706aff6aab33ebdc8 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Ergo Project)" Date: Sun, 17 Oct 2010 12:31:44 +0100 Subject: [PATCH 013/102] Apply patch for RHBZ #642160 and bump release --- dpkg.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 01e334e..91ceff0 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -20,6 +20,7 @@ Patch1: dpkg-change-libdir-path.patch # Fixes CVE-2010-0396 bugzilla #572522 Patch2: fedora-fix-CVE-2010-0396-00.patch Patch3: fedora-fix-CVE-2010-0396-01.patch +Patch4: fedora-bug642160-empty-argv.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -63,6 +64,7 @@ dselect is a high-level interface for the installation/removal of debs . %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -201,6 +203,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Oct 17 2010 Jeroen van Meeuwen - 1.15.5.6-5 +- Apply minimal fix for rhbz #642160 + * Thu Mar 11 2010 Andrew Colin Kissa - 1.15.5.6-4 - Fix CVE-2010-0396 From b6d4691a4b1d1f47d7ce9567c9998370075bc163 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Ergo Project)" Date: Sun, 17 Oct 2010 12:30:57 +0100 Subject: [PATCH 014/102] Add patch for #642160 (empty argv to dpkg --print-architecture) --- fedora-bug642160-empty-argv.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 fedora-bug642160-empty-argv.patch diff --git a/fedora-bug642160-empty-argv.patch b/fedora-bug642160-empty-argv.patch new file mode 100644 index 0000000..86528a3 --- /dev/null +++ b/fedora-bug642160-empty-argv.patch @@ -0,0 +1,15 @@ +diff -ur dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm dpkg-1.15.5.6/scripts/Dpkg/Arch.pm +--- dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm 2010-01-08 08:00:34.000000000 +0000 ++++ dpkg-1.15.5.6/scripts/Dpkg/Arch.pm 2010-10-17 12:29:46.916000478 +0100 +@@ -47,8 +47,9 @@ + return $build_arch if defined $build_arch; + + my $build_arch = `dpkg --print-architecture`; +- # FIXME: Handle bootstrapping +- syserr("dpkg --print-architecture failed") if $? >> 8; ++ if ($? >> 8 || $build_arch =~ /^\s*$/) { ++ $build_arch = get_raw_host_arch(); ++ } + + chomp $build_arch; + return $build_arch; From f03d634ea06853b7b33e8f27cb05c0f8bfed5ed6 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Ergo Project)" Date: Sun, 17 Oct 2010 12:31:44 +0100 Subject: [PATCH 015/102] Apply patch for RHBZ #642160 and bump release --- dpkg.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 01e334e..91ceff0 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -20,6 +20,7 @@ Patch1: dpkg-change-libdir-path.patch # Fixes CVE-2010-0396 bugzilla #572522 Patch2: fedora-fix-CVE-2010-0396-00.patch Patch3: fedora-fix-CVE-2010-0396-01.patch +Patch4: fedora-bug642160-empty-argv.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -63,6 +64,7 @@ dselect is a high-level interface for the installation/removal of debs . %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -201,6 +203,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Oct 17 2010 Jeroen van Meeuwen - 1.15.5.6-5 +- Apply minimal fix for rhbz #642160 + * Thu Mar 11 2010 Andrew Colin Kissa - 1.15.5.6-4 - Fix CVE-2010-0396 From 89ad4c99c35aa5cf5f0bc21d32dd4b0548a26454 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Ergo Project)" Date: Sun, 17 Oct 2010 12:30:57 +0100 Subject: [PATCH 016/102] Add patch for #642160 (empty argv to dpkg --print-architecture) --- fedora-bug642160-empty-argv.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 fedora-bug642160-empty-argv.patch diff --git a/fedora-bug642160-empty-argv.patch b/fedora-bug642160-empty-argv.patch new file mode 100644 index 0000000..86528a3 --- /dev/null +++ b/fedora-bug642160-empty-argv.patch @@ -0,0 +1,15 @@ +diff -ur dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm dpkg-1.15.5.6/scripts/Dpkg/Arch.pm +--- dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm 2010-01-08 08:00:34.000000000 +0000 ++++ dpkg-1.15.5.6/scripts/Dpkg/Arch.pm 2010-10-17 12:29:46.916000478 +0100 +@@ -47,8 +47,9 @@ + return $build_arch if defined $build_arch; + + my $build_arch = `dpkg --print-architecture`; +- # FIXME: Handle bootstrapping +- syserr("dpkg --print-architecture failed") if $? >> 8; ++ if ($? >> 8 || $build_arch =~ /^\s*$/) { ++ $build_arch = get_raw_host_arch(); ++ } + + chomp $build_arch; + return $build_arch; From 15a35655339c21461f7a205857637be27316b6d9 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Ergo Project)" Date: Sun, 17 Oct 2010 12:31:44 +0100 Subject: [PATCH 017/102] Apply patch for RHBZ #642160 and bump release --- dpkg.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 01e334e..91ceff0 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -20,6 +20,7 @@ Patch1: dpkg-change-libdir-path.patch # Fixes CVE-2010-0396 bugzilla #572522 Patch2: fedora-fix-CVE-2010-0396-00.patch Patch3: fedora-fix-CVE-2010-0396-01.patch +Patch4: fedora-bug642160-empty-argv.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -63,6 +64,7 @@ dselect is a high-level interface for the installation/removal of debs . %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -201,6 +203,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Oct 17 2010 Jeroen van Meeuwen - 1.15.5.6-5 +- Apply minimal fix for rhbz #642160 + * Thu Mar 11 2010 Andrew Colin Kissa - 1.15.5.6-4 - Fix CVE-2010-0396 From 974a9c1590bb8ab1dc5f66774b20f042760b3f04 Mon Sep 17 00:00:00 2001 From: Andrew Colin Kissa Date: Wed, 12 Jan 2011 10:27:28 +0200 Subject: [PATCH 018/102] Fixes for CVE-2010-1679 CVE-2011-0402 (#668923) --- .gitignore | 1 + dpkg.spec | 8 +- fedora-fix-CVE-2010-1679_CVE-2011-0402.patch | 176 +++++++++++++++++++ 3 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 fedora-fix-CVE-2010-1679_CVE-2011-0402.patch diff --git a/.gitignore b/.gitignore index c2fffab..0d52732 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dpkg_1.15.5.6.tar.bz2 +/dpkg_1.15.5.6.tar.bz2 diff --git a/dpkg.spec b/dpkg.spec index 91ceff0..c233462 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -21,6 +21,7 @@ Patch1: dpkg-change-libdir-path.patch Patch2: fedora-fix-CVE-2010-0396-00.patch Patch3: fedora-fix-CVE-2010-0396-01.patch Patch4: fedora-bug642160-empty-argv.patch +Patch5: fedora-fix-CVE-2010-1679_CVE-2011-0402.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -65,6 +66,7 @@ dselect is a high-level interface for the installation/removal of debs . %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -203,6 +205,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 12 2011 Andrew Colin Kissa - 1.15.5.6-6 +- Fix CVE-2010-1679 +- Fix CVE-2011-0402 + * Sun Oct 17 2010 Jeroen van Meeuwen - 1.15.5.6-5 - Apply minimal fix for rhbz #642160 diff --git a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch new file mode 100644 index 0000000..26ce08d --- /dev/null +++ b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch @@ -0,0 +1,176 @@ +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -119,7 +119,7 @@ + # Call tar extraction process + $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ]; + $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions', +- @{$opts{"options"}}, '-xkf', '-' ]; ++ @{$opts{"options"}}, '-xf', '-' ]; + fork_and_exec(%fork_opts); + $self->cleanup_after_open(); + +@@ -142,7 +142,7 @@ + closedir(D); + my $done = 0; + erasedir($dest); +- if (scalar(@entries) == 1 && -d "$tmp/$entries[0]") { ++ if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) { + rename("$tmp/$entries[0]", $dest) || + syserr(_g("Unable to rename %s to %s"), + "$tmp/$entries[0]", $dest); +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -115,7 +115,12 @@ + # Extract main tarball + info(_g("unpacking %s"), $tarfile); + my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); +- $tar->extract($newdirectory, no_fixperms => 1); ++ $tar->extract($newdirectory, no_fixperms => 1, ++ options => [ "--anchored", "--no-wildcards-match-slash", ++ "--exclude", "*/.pc", "--exclude", ".pc" ]); ++ # The .pc exclusion is only needed for 3.0 (quilt) and to avoid ++ # having an upstream tarball provide a directory with symlinks ++ # that would be blindly followed when applying the patches + + # Extract additional orig tarballs + foreach my $subdir (keys %origtar) { +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -313,11 +313,42 @@ + $header =~ s/\s.*// unless ($header =~ s/\t.*//); + return $header; + } ++ ++ sub intuit_file_patched { ++ my ($old, $new) = @_; ++ return $new unless defined $old; ++ return $old unless defined $new; ++ return $new if -e $new and not -e $old; ++ return $old if -e $old and not -e $new; ++ # We don't consider the case where both files are non-existent and ++ # where patch picks the one with the fewest directories to create ++ # since dpkg-source will pre-create the required directories ++ # ++ # Precalculate metrics used by patch ++ my ($tmp_o, $tmp_n) = ($old, $new); ++ my ($len_o, $len_n) = (length($old), length($new)); ++ $tmp_o =~ s{[/\\]+}{/}g; ++ $tmp_n =~ s{[/\\]+}{/}g; ++ my $nb_comp_o = ($tmp_o =~ tr{/}{/}); ++ my $nb_comp_n = ($tmp_n =~ tr{/}{/}); ++ $tmp_o =~ s{^.*/}{}; ++ $tmp_n =~ s{^.*/}{}; ++ my ($blen_o, $blen_n) = (length($tmp_o), length($tmp_n)); ++ # Decide like patch would ++ if ($nb_comp_o != $nb_comp_n) { ++ return ($nb_comp_o < $nb_comp_n) ? $old : $new; ++ } elsif ($blen_o != $blen_n) { ++ return ($blen_o < $blen_n) ? $old : $new; ++ } elsif ($len_o != $len_n) { ++ return ($len_o < $len_n) ? $old : $new; ++ } ++ return $old; ++ } + $_ = getline($diff_handle); + + HUNK: + while (defined($_) || not eof($diff_handle)) { +- my ($fn, $fn2); ++ my (%path, %fn); + # skip comments leading up to patch (if any) + until (/^--- /) { + last HUNK if not defined($_ = getline($diff_handle)); +@@ -327,11 +358,8 @@ + unless(s/^--- //) { + error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); + } +- $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { +- $fn = $_; +- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; +- } ++ $path{'old'} = $_ = strip_ts($_); ++ $fn{'old'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; + if (/\.dpkg-orig$/) { + error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); + } +@@ -342,46 +370,47 @@ + unless (s/^\+\+\+ //) { + error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); + } +- $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { +- $fn2 = $_; +- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; +- } else { +- unless (defined $fn) { +- error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), +- $diff, $.); +- } +- } ++ $path{'new'} = $_ = strip_ts($_); ++ $fn{'new'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; ++ ++ unless (defined $fn{'old'} or defined $fn{'new'}) { ++ error(_g("none of the filenames in ---/+++ are valid in diff '%s' (line %d)"), ++ $diff, $.); ++ } + +- if (defined($fn) and $fn eq '/dev/null') { ++ # Safety checks on both filenames that patch could use ++ foreach my $key ("old", "new") { ++ next unless defined $fn{$key}; ++ if ($path{$key} =~ m{/\.\./}) { ++ error(_g("%s contains an insecure path: %s"), $diff, $path{$key}); ++ } ++ my $path = $fn{$key}; ++ while (1) { ++ if (-l $path) { ++ error(_g("diff %s modifies file %s through a symlink: %s"), ++ $diff, $fn{$key}, $path); ++ } ++ last unless $path =~ s{/+[^/]*$}{}; ++ last if length($path) <= length($destdir); # $destdir is assumed safe ++ } ++ } ++ ++ if ($path{'old'} eq '/dev/null' and $path{'new'} eq '/dev/null') { + error(_g("original and modified files are /dev/null in diff `%s' (line %d)"), +- $diff, $.) if (defined($fn2) and $fn2 eq '/dev/null'); +- $fn = $fn2; +- } elsif (defined($fn2) and $fn2 ne '/dev/null') { +- $fn = $fn2 unless defined $fn; +- $fn = $fn2 if ((not -e $fn) and -e $fn2); +- } elsif (defined($fn2) and $fn2 eq '/dev/null') { ++ $diff, $.); ++ } elsif ($path{'new'} eq '/dev/null') { + error(_g("file removal without proper filename in diff `%s' (line %d)"), +- $diff, $. - 1) unless defined $fn; ++ $diff, $. - 1) unless defined $fn{'old'}; + warning(_g("diff %s removes a non-existing file %s (line %d)"), +- $diff, $fn, $.) unless -e $fn; ++ $diff, $fn{'old'}, $.) unless -e $fn{'old'}; + } ++ my $fn = intuit_file_patched($fn{'old'}, $fn{'new'}); + + my $dirname = $fn; + if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { + $dirtocreate{$dirname} = 1; + } + +- # Sanity check, refuse to patch through a symlink +- $dirname = $fn; +- while (1) { +- if (-l $dirname) { +- error(_g("diff %s modifies file %s through a symlink: %s"), +- $diff, $fn, $dirname); +- } +- last unless $dirname =~ s{/[^/]+$}{}; +- } +- + if (-e $fn and not -f _) { + error(_g("diff `%s' patches something which is not a plain file"), $diff); + } From e752162f83ef806ebf9d48f0274c49db080bb556 Mon Sep 17 00:00:00 2001 From: Andrew Colin Kissa Date: Wed, 12 Jan 2011 10:41:06 +0200 Subject: [PATCH 019/102] Fixes for CVE-2010-1679 CVE-2011-0402 (#668923) --- .gitignore | 1 + dpkg.spec | 8 +- fedora-fix-CVE-2010-1679_CVE-2011-0402.patch | 176 +++++++++++++++++++ 3 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 fedora-fix-CVE-2010-1679_CVE-2011-0402.patch diff --git a/.gitignore b/.gitignore index c2fffab..0d52732 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dpkg_1.15.5.6.tar.bz2 +/dpkg_1.15.5.6.tar.bz2 diff --git a/dpkg.spec b/dpkg.spec index 91ceff0..c233462 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -21,6 +21,7 @@ Patch1: dpkg-change-libdir-path.patch Patch2: fedora-fix-CVE-2010-0396-00.patch Patch3: fedora-fix-CVE-2010-0396-01.patch Patch4: fedora-bug642160-empty-argv.patch +Patch5: fedora-fix-CVE-2010-1679_CVE-2011-0402.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -65,6 +66,7 @@ dselect is a high-level interface for the installation/removal of debs . %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -203,6 +205,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 12 2011 Andrew Colin Kissa - 1.15.5.6-6 +- Fix CVE-2010-1679 +- Fix CVE-2011-0402 + * Sun Oct 17 2010 Jeroen van Meeuwen - 1.15.5.6-5 - Apply minimal fix for rhbz #642160 diff --git a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch new file mode 100644 index 0000000..26ce08d --- /dev/null +++ b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch @@ -0,0 +1,176 @@ +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -119,7 +119,7 @@ + # Call tar extraction process + $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ]; + $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions', +- @{$opts{"options"}}, '-xkf', '-' ]; ++ @{$opts{"options"}}, '-xf', '-' ]; + fork_and_exec(%fork_opts); + $self->cleanup_after_open(); + +@@ -142,7 +142,7 @@ + closedir(D); + my $done = 0; + erasedir($dest); +- if (scalar(@entries) == 1 && -d "$tmp/$entries[0]") { ++ if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) { + rename("$tmp/$entries[0]", $dest) || + syserr(_g("Unable to rename %s to %s"), + "$tmp/$entries[0]", $dest); +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -115,7 +115,12 @@ + # Extract main tarball + info(_g("unpacking %s"), $tarfile); + my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); +- $tar->extract($newdirectory, no_fixperms => 1); ++ $tar->extract($newdirectory, no_fixperms => 1, ++ options => [ "--anchored", "--no-wildcards-match-slash", ++ "--exclude", "*/.pc", "--exclude", ".pc" ]); ++ # The .pc exclusion is only needed for 3.0 (quilt) and to avoid ++ # having an upstream tarball provide a directory with symlinks ++ # that would be blindly followed when applying the patches + + # Extract additional orig tarballs + foreach my $subdir (keys %origtar) { +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -313,11 +313,42 @@ + $header =~ s/\s.*// unless ($header =~ s/\t.*//); + return $header; + } ++ ++ sub intuit_file_patched { ++ my ($old, $new) = @_; ++ return $new unless defined $old; ++ return $old unless defined $new; ++ return $new if -e $new and not -e $old; ++ return $old if -e $old and not -e $new; ++ # We don't consider the case where both files are non-existent and ++ # where patch picks the one with the fewest directories to create ++ # since dpkg-source will pre-create the required directories ++ # ++ # Precalculate metrics used by patch ++ my ($tmp_o, $tmp_n) = ($old, $new); ++ my ($len_o, $len_n) = (length($old), length($new)); ++ $tmp_o =~ s{[/\\]+}{/}g; ++ $tmp_n =~ s{[/\\]+}{/}g; ++ my $nb_comp_o = ($tmp_o =~ tr{/}{/}); ++ my $nb_comp_n = ($tmp_n =~ tr{/}{/}); ++ $tmp_o =~ s{^.*/}{}; ++ $tmp_n =~ s{^.*/}{}; ++ my ($blen_o, $blen_n) = (length($tmp_o), length($tmp_n)); ++ # Decide like patch would ++ if ($nb_comp_o != $nb_comp_n) { ++ return ($nb_comp_o < $nb_comp_n) ? $old : $new; ++ } elsif ($blen_o != $blen_n) { ++ return ($blen_o < $blen_n) ? $old : $new; ++ } elsif ($len_o != $len_n) { ++ return ($len_o < $len_n) ? $old : $new; ++ } ++ return $old; ++ } + $_ = getline($diff_handle); + + HUNK: + while (defined($_) || not eof($diff_handle)) { +- my ($fn, $fn2); ++ my (%path, %fn); + # skip comments leading up to patch (if any) + until (/^--- /) { + last HUNK if not defined($_ = getline($diff_handle)); +@@ -327,11 +358,8 @@ + unless(s/^--- //) { + error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); + } +- $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { +- $fn = $_; +- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; +- } ++ $path{'old'} = $_ = strip_ts($_); ++ $fn{'old'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; + if (/\.dpkg-orig$/) { + error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); + } +@@ -342,46 +370,47 @@ + unless (s/^\+\+\+ //) { + error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); + } +- $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { +- $fn2 = $_; +- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; +- } else { +- unless (defined $fn) { +- error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), +- $diff, $.); +- } +- } ++ $path{'new'} = $_ = strip_ts($_); ++ $fn{'new'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; ++ ++ unless (defined $fn{'old'} or defined $fn{'new'}) { ++ error(_g("none of the filenames in ---/+++ are valid in diff '%s' (line %d)"), ++ $diff, $.); ++ } + +- if (defined($fn) and $fn eq '/dev/null') { ++ # Safety checks on both filenames that patch could use ++ foreach my $key ("old", "new") { ++ next unless defined $fn{$key}; ++ if ($path{$key} =~ m{/\.\./}) { ++ error(_g("%s contains an insecure path: %s"), $diff, $path{$key}); ++ } ++ my $path = $fn{$key}; ++ while (1) { ++ if (-l $path) { ++ error(_g("diff %s modifies file %s through a symlink: %s"), ++ $diff, $fn{$key}, $path); ++ } ++ last unless $path =~ s{/+[^/]*$}{}; ++ last if length($path) <= length($destdir); # $destdir is assumed safe ++ } ++ } ++ ++ if ($path{'old'} eq '/dev/null' and $path{'new'} eq '/dev/null') { + error(_g("original and modified files are /dev/null in diff `%s' (line %d)"), +- $diff, $.) if (defined($fn2) and $fn2 eq '/dev/null'); +- $fn = $fn2; +- } elsif (defined($fn2) and $fn2 ne '/dev/null') { +- $fn = $fn2 unless defined $fn; +- $fn = $fn2 if ((not -e $fn) and -e $fn2); +- } elsif (defined($fn2) and $fn2 eq '/dev/null') { ++ $diff, $.); ++ } elsif ($path{'new'} eq '/dev/null') { + error(_g("file removal without proper filename in diff `%s' (line %d)"), +- $diff, $. - 1) unless defined $fn; ++ $diff, $. - 1) unless defined $fn{'old'}; + warning(_g("diff %s removes a non-existing file %s (line %d)"), +- $diff, $fn, $.) unless -e $fn; ++ $diff, $fn{'old'}, $.) unless -e $fn{'old'}; + } ++ my $fn = intuit_file_patched($fn{'old'}, $fn{'new'}); + + my $dirname = $fn; + if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { + $dirtocreate{$dirname} = 1; + } + +- # Sanity check, refuse to patch through a symlink +- $dirname = $fn; +- while (1) { +- if (-l $dirname) { +- error(_g("diff %s modifies file %s through a symlink: %s"), +- $diff, $fn, $dirname); +- } +- last unless $dirname =~ s{/[^/]+$}{}; +- } +- + if (-e $fn and not -f _) { + error(_g("diff `%s' patches something which is not a plain file"), $diff); + } From 0f9aafea1c3e67e86597013494a0b1ddc262f843 Mon Sep 17 00:00:00 2001 From: Andrew Colin Kissa Date: Wed, 12 Jan 2011 10:42:56 +0200 Subject: [PATCH 020/102] Fixes for CVE-2010-1679 CVE-2011-0402 (#668923) --- .gitignore | 1 + dpkg.spec | 8 +- fedora-fix-CVE-2010-1679_CVE-2011-0402.patch | 176 +++++++++++++++++++ 3 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 fedora-fix-CVE-2010-1679_CVE-2011-0402.patch diff --git a/.gitignore b/.gitignore index c2fffab..0d52732 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dpkg_1.15.5.6.tar.bz2 +/dpkg_1.15.5.6.tar.bz2 diff --git a/dpkg.spec b/dpkg.spec index 91ceff0..c233462 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -21,6 +21,7 @@ Patch1: dpkg-change-libdir-path.patch Patch2: fedora-fix-CVE-2010-0396-00.patch Patch3: fedora-fix-CVE-2010-0396-01.patch Patch4: fedora-bug642160-empty-argv.patch +Patch5: fedora-fix-CVE-2010-1679_CVE-2011-0402.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel @@ -65,6 +66,7 @@ dselect is a high-level interface for the installation/removal of debs . %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -203,6 +205,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 12 2011 Andrew Colin Kissa - 1.15.5.6-6 +- Fix CVE-2010-1679 +- Fix CVE-2011-0402 + * Sun Oct 17 2010 Jeroen van Meeuwen - 1.15.5.6-5 - Apply minimal fix for rhbz #642160 diff --git a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch new file mode 100644 index 0000000..26ce08d --- /dev/null +++ b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch @@ -0,0 +1,176 @@ +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -119,7 +119,7 @@ + # Call tar extraction process + $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ]; + $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions', +- @{$opts{"options"}}, '-xkf', '-' ]; ++ @{$opts{"options"}}, '-xf', '-' ]; + fork_and_exec(%fork_opts); + $self->cleanup_after_open(); + +@@ -142,7 +142,7 @@ + closedir(D); + my $done = 0; + erasedir($dest); +- if (scalar(@entries) == 1 && -d "$tmp/$entries[0]") { ++ if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) { + rename("$tmp/$entries[0]", $dest) || + syserr(_g("Unable to rename %s to %s"), + "$tmp/$entries[0]", $dest); +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -115,7 +115,12 @@ + # Extract main tarball + info(_g("unpacking %s"), $tarfile); + my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); +- $tar->extract($newdirectory, no_fixperms => 1); ++ $tar->extract($newdirectory, no_fixperms => 1, ++ options => [ "--anchored", "--no-wildcards-match-slash", ++ "--exclude", "*/.pc", "--exclude", ".pc" ]); ++ # The .pc exclusion is only needed for 3.0 (quilt) and to avoid ++ # having an upstream tarball provide a directory with symlinks ++ # that would be blindly followed when applying the patches + + # Extract additional orig tarballs + foreach my $subdir (keys %origtar) { +diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm +--- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm 2010-04-15 13:38:58.000000000 +0200 ++++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm 2011-01-06 21:08:30.000000000 +0200 +@@ -313,11 +313,42 @@ + $header =~ s/\s.*// unless ($header =~ s/\t.*//); + return $header; + } ++ ++ sub intuit_file_patched { ++ my ($old, $new) = @_; ++ return $new unless defined $old; ++ return $old unless defined $new; ++ return $new if -e $new and not -e $old; ++ return $old if -e $old and not -e $new; ++ # We don't consider the case where both files are non-existent and ++ # where patch picks the one with the fewest directories to create ++ # since dpkg-source will pre-create the required directories ++ # ++ # Precalculate metrics used by patch ++ my ($tmp_o, $tmp_n) = ($old, $new); ++ my ($len_o, $len_n) = (length($old), length($new)); ++ $tmp_o =~ s{[/\\]+}{/}g; ++ $tmp_n =~ s{[/\\]+}{/}g; ++ my $nb_comp_o = ($tmp_o =~ tr{/}{/}); ++ my $nb_comp_n = ($tmp_n =~ tr{/}{/}); ++ $tmp_o =~ s{^.*/}{}; ++ $tmp_n =~ s{^.*/}{}; ++ my ($blen_o, $blen_n) = (length($tmp_o), length($tmp_n)); ++ # Decide like patch would ++ if ($nb_comp_o != $nb_comp_n) { ++ return ($nb_comp_o < $nb_comp_n) ? $old : $new; ++ } elsif ($blen_o != $blen_n) { ++ return ($blen_o < $blen_n) ? $old : $new; ++ } elsif ($len_o != $len_n) { ++ return ($len_o < $len_n) ? $old : $new; ++ } ++ return $old; ++ } + $_ = getline($diff_handle); + + HUNK: + while (defined($_) || not eof($diff_handle)) { +- my ($fn, $fn2); ++ my (%path, %fn); + # skip comments leading up to patch (if any) + until (/^--- /) { + last HUNK if not defined($_ = getline($diff_handle)); +@@ -327,11 +358,8 @@ + unless(s/^--- //) { + error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); + } +- $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { +- $fn = $_; +- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; +- } ++ $path{'old'} = $_ = strip_ts($_); ++ $fn{'old'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; + if (/\.dpkg-orig$/) { + error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); + } +@@ -342,46 +370,47 @@ + unless (s/^\+\+\+ //) { + error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); + } +- $_ = strip_ts($_); +- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { +- $fn2 = $_; +- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; +- } else { +- unless (defined $fn) { +- error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), +- $diff, $.); +- } +- } ++ $path{'new'} = $_ = strip_ts($_); ++ $fn{'new'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; ++ ++ unless (defined $fn{'old'} or defined $fn{'new'}) { ++ error(_g("none of the filenames in ---/+++ are valid in diff '%s' (line %d)"), ++ $diff, $.); ++ } + +- if (defined($fn) and $fn eq '/dev/null') { ++ # Safety checks on both filenames that patch could use ++ foreach my $key ("old", "new") { ++ next unless defined $fn{$key}; ++ if ($path{$key} =~ m{/\.\./}) { ++ error(_g("%s contains an insecure path: %s"), $diff, $path{$key}); ++ } ++ my $path = $fn{$key}; ++ while (1) { ++ if (-l $path) { ++ error(_g("diff %s modifies file %s through a symlink: %s"), ++ $diff, $fn{$key}, $path); ++ } ++ last unless $path =~ s{/+[^/]*$}{}; ++ last if length($path) <= length($destdir); # $destdir is assumed safe ++ } ++ } ++ ++ if ($path{'old'} eq '/dev/null' and $path{'new'} eq '/dev/null') { + error(_g("original and modified files are /dev/null in diff `%s' (line %d)"), +- $diff, $.) if (defined($fn2) and $fn2 eq '/dev/null'); +- $fn = $fn2; +- } elsif (defined($fn2) and $fn2 ne '/dev/null') { +- $fn = $fn2 unless defined $fn; +- $fn = $fn2 if ((not -e $fn) and -e $fn2); +- } elsif (defined($fn2) and $fn2 eq '/dev/null') { ++ $diff, $.); ++ } elsif ($path{'new'} eq '/dev/null') { + error(_g("file removal without proper filename in diff `%s' (line %d)"), +- $diff, $. - 1) unless defined $fn; ++ $diff, $. - 1) unless defined $fn{'old'}; + warning(_g("diff %s removes a non-existing file %s (line %d)"), +- $diff, $fn, $.) unless -e $fn; ++ $diff, $fn{'old'}, $.) unless -e $fn{'old'}; + } ++ my $fn = intuit_file_patched($fn{'old'}, $fn{'new'}); + + my $dirname = $fn; + if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { + $dirtocreate{$dirname} = 1; + } + +- # Sanity check, refuse to patch through a symlink +- $dirname = $fn; +- while (1) { +- if (-l $dirname) { +- error(_g("diff %s modifies file %s through a symlink: %s"), +- $diff, $fn, $dirname); +- } +- last unless $dirname =~ s{/[^/]+$}{}; +- } +- + if (-e $fn and not -f _) { + error(_g("diff `%s' patches something which is not a plain file"), $diff); + } From 930ea0d1ceaad57589000fc7b98a1408a4cdb27a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 08:58:32 -0600 Subject: [PATCH 021/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index c233462..26500e2 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -205,6 +205,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 1.15.5.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Wed Jan 12 2011 Andrew Colin Kissa - 1.15.5.6-6 - Fix CVE-2010-1679 - Fix CVE-2011-0402 From 7adca8d67d47bf7466b3be9a327fc066342cf5da Mon Sep 17 00:00:00 2001 From: Andrew Colin Kissa Date: Thu, 10 Feb 2011 20:22:49 +0200 Subject: [PATCH 022/102] + fix build for el5 --- dpkg.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index c233462..35835b2 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -44,7 +44,6 @@ Summary: Debian package development tools Group: Development/System Requires: %{name} = %{version}-%{release} Requires: perl, patch, make, binutils, bzip2, lzma -BuildArch: noarch %description devel This package provides the development tools (including dpkg-source). From e9277aefd0aba42ba982c6521173fb3636a69824 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 18:59:24 -0600 Subject: [PATCH 023/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 26500e2..70e29fc 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -205,6 +205,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 1.15.5.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Feb 08 2011 Fedora Release Engineering - 1.15.5.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From a9db65d82e31458cc98d3863362b958dffefda5c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 18 Jul 2012 16:17:01 -0500 Subject: [PATCH 024/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 70e29fc..c252412 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -205,6 +205,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jul 18 2012 Fedora Release Engineering - 1.15.5.6-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Jan 13 2012 Fedora Release Engineering - 1.15.5.6-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From dbd49825a91c2896941e9ae313965578050469f5 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 13:59:20 -0600 Subject: [PATCH 025/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index c252412..dd4cb1a 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.15.5.6 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -205,6 +205,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Feb 13 2013 Fedora Release Engineering - 1.15.5.6-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Wed Jul 18 2012 Fedora Release Engineering - 1.15.5.6-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 82d53b78b2fce438bb97202c901acb8742828777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Thu, 16 May 2013 08:09:14 +0100 Subject: [PATCH 026/102] Add BR perl-podlators for pod2man in F19 development or just BR perl - Add some other importants BR: doxygen flex xz-devel po4a dotconf-devel - Fix packages names which are debianized, so packages will be: dpkg-perl and dpkg-dev (and dpkg-devel for headers of dpkg). - Some clean ups. by Oron Peled: - Bump version to Debian/wheezy - Call autoreconf: make sure we don't reuse Debian packaged stuff (config.guess, etc.) - CVE patches not needed -- is already fixed upstream - Removed dpkg-change-libdir.patch: - Patching Makefile.in is wrong (can patch Makefile.am with autoreconf) - Less patch churn for non-critical paths - Accept /usr/lib/dpkg/parsechangelog - Accept /usr/lib/dpkg/methods --- dpkg-change-libdir-path.patch | 268 ------------------ dpkg.spec | 283 +++++++++++++++---- fedora-bug642160-empty-argv.patch | 15 - fedora-fix-CVE-2010-0396-00.patch | 43 --- fedora-fix-CVE-2010-0396-01.patch | 11 - fedora-fix-CVE-2010-1679_CVE-2011-0402.patch | 176 ------------ 6 files changed, 230 insertions(+), 566 deletions(-) delete mode 100644 dpkg-change-libdir-path.patch delete mode 100644 fedora-bug642160-empty-argv.patch delete mode 100644 fedora-fix-CVE-2010-0396-00.patch delete mode 100644 fedora-fix-CVE-2010-0396-01.patch delete mode 100644 fedora-fix-CVE-2010-1679_CVE-2011-0402.patch diff --git a/dpkg-change-libdir-path.patch b/dpkg-change-libdir-path.patch deleted file mode 100644 index 0f1d856..0000000 --- a/dpkg-change-libdir-path.patch +++ /dev/null @@ -1,268 +0,0 @@ -diff -ruN dpkg-1.15.5.6.orig/dselect/Makefile.in dpkg-1.15.5.6/dselect/Makefile.in ---- dpkg-1.15.5.6.orig/dselect/Makefile.in 2010-01-08 20:02:49.000000000 +0200 -+++ dpkg-1.15.5.6/dselect/Makefile.in 2010-02-14 10:11:43.052023614 +0200 -@@ -276,7 +276,7 @@ - AM_CPPFLAGS = \ - -DLOCALEDIR=\"$(localedir)\" \ - -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \ -- -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ -+ -DLOCALLIBDIR=\"/usr/local/share/dpkg\" \ - -idirafter $(top_srcdir)/lib/compat \ - -iquote $(builddir) \ - -I$(top_builddir) \ -diff -ruN dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm ---- dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm 2010-02-14 09:16:24.669895188 +0200 -@@ -57,12 +57,12 @@ - } - - sub view_mirrors { -- if (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt') { -- system('/usr/bin/pager', '/usr/lib/dpkg/methods/ftp/README.mirrors.txt'); -- } elsif (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz') { -- system('gzip -dc /usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); -+ if (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt') { -+ system('/usr/bin/pager', '/usr/share/dpkg/methods/ftp/README.mirrors.txt'); -+ } elsif (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt.gz') { -+ system('gzip -dc /usr/share/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); - } else { -- print "/usr/lib/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; -+ print "/usr/share/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; - } - } - -diff -ruN dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 2010-02-14 09:22:07.409881825 +0200 -@@ -30,8 +30,8 @@ - \fB\-L\fP\fIlibverzeichnis\fP - Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser\-Skripten - durchsucht werden soll. Diese Verzeichnis wird vor den --Standardverzeichnissen (derzeit \fB/usr/local/lib/dpkg/parsechangelog\fP und --\fB/usr/lib/dpkg/parsechangelog\fP) durchsucht. -+Standardverzeichnissen (derzeit \fB/usr/local/share/dpkg/parsechangelog\fP und -+\fB/usr/share/dpkg/parsechangelog\fP) durchsucht. - .TP - \fB\-h\fP, \fB\-\-help\fP - Zeige den Bedienungshinweis und beende. -diff -ruN dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/man/dpkg-parsechangelog.1 2010-02-14 09:17:34.013861295 +0200 -@@ -28,8 +28,8 @@ - Specify an additional directory to search for parser scripts. - This directory is searched before the default directories - which are currently --.BR /usr/local/lib/dpkg/parsechangelog " and " --.BR /usr/lib/dpkg/parsechangelog . -+.BR /usr/share/dpkg/parsechangelog " and " -+.BR /usr/local/share/dpkg/parsechangelog . - .TP - .BR \-h ", " \-\-help - Show the usage message and exit. -diff -ruN dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 2010-02-14 09:22:29.321880079 +0200 -@@ -29,8 +29,8 @@ - \fB\-L\fP\fIrep_lib\fP - Spécifie un répertoire supplémentaire pour la recherche de scripts - d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui --sont \fB/usr/local/lib/dpkg/parsechangelog\fP et --\fB/usr/lib/dpkg/parsechangelog\fP. -+sont \fB/usr/local/share/dpkg/parsechangelog\fP et -+\fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Affiche un message d'aide puis quitte. -diff -ruN dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 2010-02-14 09:21:02.338880496 +0200 -@@ -29,8 +29,8 @@ - \fB\-L\fP\fIkatalog\-lib\fP - Okre¶la dodatkowy katalog, w którym bêd± wyszukiwane skrypty - parsera. Katalog ten jest przeszukiwany przed domy¶lnymi katalogami, którymi --obecnie s± \fB/usr/local/lib/dpkg/parsechangelog\fP oraz --\fB/usr/lib/dpkg/parsechangelog\fP. -+obecnie s± \fB/usr/local/share/dpkg/parsechangelog\fP oraz -+\fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Wy¶wietla informacjê o u¿ytkowaniu i koñczy dzia³anie. -diff -ruN dpkg-1.15.5.6.orig/man/po/de.po dpkg-1.15.5.6/man/po/de.po ---- dpkg-1.15.5.6.orig/man/po/de.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/de.po 2010-02-14 09:26:20.671868793 +0200 -@@ -7747,12 +7747,12 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser-Skripten " - "durchsucht werden soll. Diese Verzeichnis wird vor den " --"Standardverzeichnissen (derzeit B und B) durchsucht." -+"Standardverzeichnissen (derzeit B und B) durchsucht." - - #. type: SS - #: dpkg-parsechangelog.1:39 -diff -ruN dpkg-1.15.5.6.orig/man/po/dpkg-man.pot dpkg-1.15.5.6/man/po/dpkg-man.pot ---- dpkg-1.15.5.6.orig/man/po/dpkg-man.pot 2010-01-08 19:23:01.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/dpkg-man.pot 2010-02-14 09:30:59.909878930 +0200 -@@ -6216,7 +6216,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently " --"B and B." -+"B and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/es.po dpkg-1.15.5.6/man/po/es.po ---- dpkg-1.15.5.6.orig/man/po/es.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/es.po 2010-02-14 09:30:16.053872999 +0200 -@@ -7517,7 +7517,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/fr.po dpkg-1.15.5.6/man/po/fr.po ---- dpkg-1.15.5.6.orig/man/po/fr.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/fr.po 2010-02-14 09:24:19.351874142 +0200 -@@ -7737,11 +7737,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Spécifie un répertoire supplémentaire pour la recherche de scripts " - "d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui " --"sont B et B et B." - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/hu.po dpkg-1.15.5.6/man/po/hu.po ---- dpkg-1.15.5.6.orig/man/po/hu.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/hu.po 2010-02-14 09:26:50.311874455 +0200 -@@ -6542,7 +6542,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/ja.po dpkg-1.15.5.6/man/po/ja.po ---- dpkg-1.15.5.6.orig/man/po/ja.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/ja.po 2010-02-14 09:28:46.064874305 +0200 -@@ -7055,7 +7055,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/pl.po dpkg-1.15.5.6/man/po/pl.po ---- dpkg-1.15.5.6.orig/man/po/pl.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/pl.po 2010-02-14 09:27:38.024873694 +0200 -@@ -7819,11 +7819,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "OkreÅ›la dodatkowy katalog, w którym bÄ™dÄ… wyszukiwane skrypty parsera. " - "Katalog ten jest przeszukiwany przed domyÅ›lnymi katalogami, którymi obecnie " --"sÄ… B oraz B oraz B." - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/pt_BR.po dpkg-1.15.5.6/man/po/pt_BR.po ---- dpkg-1.15.5.6.orig/man/po/pt_BR.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/pt_BR.po 2010-02-14 09:28:12.583874117 +0200 -@@ -6687,7 +6687,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/ru.po dpkg-1.15.5.6/man/po/ru.po ---- dpkg-1.15.5.6.orig/man/po/ru.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/ru.po 2010-02-14 09:25:17.556873843 +0200 -@@ -6823,7 +6823,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/sv.po dpkg-1.15.5.6/man/po/sv.po ---- dpkg-1.15.5.6.orig/man/po/sv.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/sv.po 2010-02-14 09:29:32.735874132 +0200 -@@ -7552,11 +7552,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks " --"genom innan standardkatalogerna, vilka för närvarande är B och B." -+"genom innan standardkatalogerna, vilka för närvarande är B och B." - - #. type: SS - #: dpkg-parsechangelog.1:39 -diff -ruN dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 2010-02-14 09:22:54.488880085 +0200 -@@ -29,7 +29,7 @@ - \fB\-L\fP\fIbibliotekskatalog\fP - Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks - genom innan standardkatalogerna, vilka för närvarande är --\fB/usr/local/lib/dpkg/parsechangelog\fP och \fB/usr/lib/dpkg/parsechangelog\fP. -+\fB/usr/local/share/dpkg/parsechangelog\fP och \fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Visar hjälpskärm och avslutar. -diff -ruN dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm ---- dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm 2010-02-14 09:14:27.550879827 +0200 -@@ -50,7 +50,7 @@ - - The parsing itself is done by an external program (searched in the - following list of directories: $opt{libdir}, --/usr/local/lib/dpkg/parsechangelog, /usr/lib/dpkg/parsechangelog) That -+/usr/local/share/dpkg/parsechangelogusr) That - program is named according to the format that it's able to parse. By - default it's either "debian" or the format name lookep up in the 40 last - lines of the changelog itself (extracted with this perl regular expression -@@ -70,9 +70,8 @@ - - sub changelog_parse { - my (%options) = @_; -- my @parserpath = ("/usr/local/lib/dpkg/parsechangelog", -- "$dpkglibdir/parsechangelog", -- "/usr/lib/dpkg/parsechangelog"); -+ my @parserpath = ( "$dpkglibdir/parsechangelog", -+ "/usr/local/share/dpkg/parsechangelog"); - my $format = "debian"; - my $changelogfile = "debian/changelog"; - my $force = 0; diff --git a/dpkg.spec b/dpkg.spec index dd4cb1a..79b0638 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg -Version: 1.15.5.6 -Release: 10%{?dist} +Version: 1.16.10 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -11,19 +11,17 @@ Group: System Environment/Base # lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+ License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg -Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.bz2 -# obtained from dpkg-source -x dpkg_1.15.5.6.dsc -Source1: dpkg.archtable -# Fedora specific patch to store files under /usr/share/dpkg, not these are not binary -# libs. and set user search path to /usr/local/share/dpkg -Patch1: dpkg-change-libdir-path.patch -# Fixes CVE-2010-0396 bugzilla #572522 -Patch2: fedora-fix-CVE-2010-0396-00.patch -Patch3: fedora-fix-CVE-2010-0396-01.patch -Patch4: fedora-bug642160-empty-argv.patch -Patch5: fedora-fix-CVE-2010-1679_CVE-2011-0402.patch +Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel +BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel +BuildRequires: autoconf automake gettext-devel +BuildRequires: doxygen flex xz-devel po4a dotconf-devel +# for /usr/bin/pod2man +%if 0%{?fedora} > 18 +BuildRequires: perl-podlators +%else +BuildRequires: perl +%endif %description @@ -40,16 +38,55 @@ dpkg and dselect will certainly be non-functional on a rpm-based system because packages dependencies will likely be unmet. %package devel +Summary: Debian package management static library +Group: Development/System + +%description devel +This package provides the header files and static library necessary to +develop software using dpkg, the same library used internally by dpkg. + +Note though, that the API is to be considered volatile, and might change +at any time, use at your own risk. + + +%package -n dpkg-dev Summary: Debian package development tools Group: Development/System -Requires: %{name} = %{version}-%{release} -Requires: perl, patch, make, binutils, bzip2, lzma +Requires: dpkg-perl = %{version}-%{release} +Requires: patch, make, binutils, bzip2, lzma, xz BuildArch: noarch -%description devel +%description -n dpkg-dev This package provides the development tools (including dpkg-source). Required to unpack, build and upload Debian source packages +%package perl +Summary: Dpkg perl modules +Group: System Environment/Base +Requires: %{name} = %{version}-%{release} +Requires: perl, perl-TimeDate +BuildArch: noarch + +%description perl +This package provides the perl modules used by the scripts +in dpkg-dev. They cover a wide range of functionalities. Among them +there are the following modules: + - Dpkg::Arch: manipulate Debian architecture information + - Dpkg::BuildOptions: parse and manipulate DEB_BUILD_OPTIONS + - Dpkg::Changelog: parse Debian changelogs + - Dpkg::Checksums: generate and parse checksums + - Dpkg::Compression::Process: wrapper around compression tools + - Dpkg::Compression::FileHandle: transparently (de)compress files + - Dpkg::Control: parse and manipulate Debian control information + (.dsc, .changes, Packages/Sources entries, etc.) + - Dpkg::Deps: parse and manipulate dependencies + - Dpkg::ErrorHandling: common error functions + - Dpkg::Index: collections of Dpkg::Control (Packages/Sources files for + example) + - Dpkg::IPC: spawn sub-processes and feed/retrieve data + - Dpkg::Substvars: substitute variables in strings + - Dpkg::Vendor: identify current distribution vendor + - Dpkg::Version: parse and manipulate Debian package versions %package -n dselect Summary: Debian package management front-end @@ -62,12 +99,6 @@ dselect is a high-level interface for the installation/removal of debs . %prep %setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - # Filter unwanted Requires: cat << \EOF > %{name}-req #!/bin/sh @@ -79,39 +110,43 @@ EOF chmod +x %{__perl_requires} %build -%configure --without-start-stop-daemon \ +autoreconf -fiv +%configure --disable-start-stop-daemon \ --disable-linker-optimisations \ --with-admindir=%{_localstatedir}/lib/dpkg \ - --libdir=%{_datadir} \ --with-selinux \ --with-zlib \ - --with-bz2 \ - --disable-silent-rules + --with-bz2 make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -install -pm0644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable + +# from debian/dpkg.install +install -pm0644 debian/archtable $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable +install -pm0644 debian/dpkg.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/dpkg.cfg %find_lang dpkg %find_lang dpkg-dev %find_lang dselect # fedora has its own implementation -rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives +rm $RPM_BUILD_ROOT%{_bindir}/update-alternatives +rm $RPM_BUILD_ROOT%{_mandir}/man8/update-alternatives.8 +rm -rf $RPM_BUILD_ROOT%{_mandir}/*/man8/update-alternatives.8 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ -%clean -rm -rf $RPM_BUILD_ROOT - +#fedora has own implemenation +#FIXME should we remove this ? +rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %files -f dpkg.lang %defattr(-,root,root,-) %doc debian/changelog README AUTHORS COPYING THANKS TODO %dir %{_sysconfdir}/dpkg +%config(noreplace) %{_sysconfdir}/dpkg.cfg %{_bindir}/dpkg %{_bindir}/dpkg-deb %{_bindir}/dpkg-query @@ -119,9 +154,10 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride -%{_sbindir}/* +%{_bindir}/dpkg-buildflags +%{_bindir}/dpkg-maintscript-helper +%{_bindir}/dpkg-mergechangelogs %dir %{_datadir}/dpkg -%{_datadir}/dpkg/mksplit %{_datadir}/dpkg/archtable %{_datadir}/dpkg/cputable %{_datadir}/dpkg/ostable @@ -129,20 +165,64 @@ rm -rf $RPM_BUILD_ROOT %{perl_vendorlib}/Dpkg.pm %dir %{perl_vendorlib}/Dpkg %{perl_vendorlib}/Dpkg/Gettext.pm +%{_mandir}/man1/dpkg.1.gz +%{_mandir}/man1/dpkg-architecture.1.gz +%{_mandir}/man1/dpkg-buildflags.1.gz +%{_mandir}/man1/dpkg-buildpackage.1.gz +%{_mandir}/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/man1/dpkg-deb.1.gz +%{_mandir}/man1/dpkg-distaddfile.1.gz +%{_mandir}/man1/dpkg-genchanges.1.gz +%{_mandir}/man1/dpkg-gencontrol.1.gz +%{_mandir}/man1/dpkg-gensymbols.1.gz +%{_mandir}/man1/dpkg-maintscript-helper.1.gz +%{_mandir}/man1/dpkg-mergechangelogs.1.gz +%{_mandir}/man1/dpkg-name.1.gz +%{_mandir}/man1/dpkg-parsechangelog.1.gz %{_mandir}/man1/dpkg-query.1.gz +%{_mandir}/man1/dpkg-scanpackages.1.gz +%{_mandir}/man1/dpkg-scansources.1.gz +%{_mandir}/man1/dpkg-shlibdeps.1.gz +%{_mandir}/man1/dpkg-source.1.gz %{_mandir}/man1/dpkg-split.1.gz %{_mandir}/man1/dpkg-trigger.1.gz -%{_mandir}/man1/dpkg.1.gz +%{_mandir}/man1/dpkg-vendor.1.gz %{_mandir}/man5/dpkg.cfg.5.gz %{_mandir}/man8/dpkg-divert.8.gz %{_mandir}/man8/dpkg-statoverride.8.gz -#fedora has own implemenation -%exclude %{_sbindir}/install-info -#fedora has own implemenation -%exclude %{_mandir}/man8/update-alternatives.8.gz +%{_mandir}/*/man1/dpkg.1.gz +%{_mandir}/*/man1/dpkg-architecture.1.gz +%{_mandir}/*/man1/dpkg-buildflags.1.gz +%{_mandir}/*/man1/dpkg-buildpackage.1.gz +%{_mandir}/*/man1/dpkg-checkbuilddeps.1.gz +%{_mandir}/*/man1/dpkg-deb.1.gz +%{_mandir}/*/man1/dpkg-distaddfile.1.gz +%{_mandir}/*/man1/dpkg-genchanges.1.gz +%{_mandir}/*/man1/dpkg-gencontrol.1.gz +%{_mandir}/*/man1/dpkg-gensymbols.1.gz +%{_mandir}/*/man1/dpkg-maintscript-helper.1.gz +%{_mandir}/*/man1/dpkg-mergechangelogs.1.gz +%{_mandir}/*/man1/dpkg-name.1.gz +%{_mandir}/*/man1/dpkg-parsechangelog.1.gz +%{_mandir}/*/man1/dpkg-query.1.gz +%{_mandir}/*/man1/dpkg-scanpackages.1.gz +%{_mandir}/*/man1/dpkg-scansources.1.gz +%{_mandir}/*/man1/dpkg-shlibdeps.1.gz +%{_mandir}/*/man1/dpkg-source.1.gz +%{_mandir}/*/man1/dpkg-split.1.gz +%{_mandir}/*/man1/dpkg-trigger.1.gz +%{_mandir}/*/man1/dpkg-vendor.1.gz +%{_mandir}/*/man5/dpkg.cfg.5.gz +%{_mandir}/*/man8/dpkg-divert.8.gz +%{_mandir}/*/man8/dpkg-statoverride.8.gz + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libdpkg.a +%{_libdir}/pkgconfig/libdpkg.pc +%{_includedir}/dpkg/*.h -%files devel -f dpkg-dev.lang +%files -n dpkg-dev -f dpkg-dev.lang %defattr(-,root,root,-) %doc doc/README.api %{_bindir}/dpkg-architecture @@ -159,15 +239,13 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -%dir %{_datadir}/dpkg/parsechangelog -%{_datadir}/dpkg/parsechangelog/* -%exclude %{perl_vendorlib}/Dpkg/Gettext.pm -%{perl_vendorlib}/Dpkg/*.pm -%{perl_vendorlib}/Dpkg/Changelog -%{perl_vendorlib}/Dpkg/Shlibs -%{perl_vendorlib}/Dpkg/Source -%{perl_vendorlib}/Dpkg/Vendor -%{perl_vendorlib}/Dpkg/Control +# FIXME: what are these? +%{_datadir}/dpkg/abitable +%{_datadir}/dpkg/architecture.mk +%{_datadir}/dpkg/buildflags.mk +%{_datadir}/dpkg/default.mk +%{_datadir}/dpkg/pkg-info.mk +%{_datadir}/dpkg/vendor.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildpackage.1.gz %{_mandir}/man1/dpkg-checkbuilddeps.1.gz @@ -183,15 +261,93 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/dpkg-source.1.gz %{_mandir}/man1/dpkg-vendor.1.gz %{_mandir}/man5/deb-control.5.gz +%{_mandir}/man5/deb-extra-override.5.gz %{_mandir}/man5/deb-old.5.gz +%{_mandir}/man5/deb-origin.5.gz %{_mandir}/man5/deb-override.5.gz -%{_mandir}/man5/deb-extra-override.5.gz %{_mandir}/man5/deb-shlibs.5.gz +%{_mandir}/man5/deb-split.5.gz +%{_mandir}/man5/deb-src-control.5.gz %{_mandir}/man5/deb-substvars.5.gz %{_mandir}/man5/deb-symbols.5.gz %{_mandir}/man5/deb-triggers.5.gz %{_mandir}/man5/deb-version.5.gz %{_mandir}/man5/deb.5.gz +%{_mandir}/*/man1/dpkg-architecture.1.gz +%{_mandir}/*/man1/dpkg-buildpackage.1.gz +%{_mandir}/*/man1/dpkg-checkbuilddeps.1.gz +%{_mandir}/*/man1/dpkg-distaddfile.1.gz +%{_mandir}/*/man1/dpkg-genchanges.1.gz +%{_mandir}/*/man1/dpkg-gencontrol.1.gz +%{_mandir}/*/man1/dpkg-gensymbols.1.gz +%{_mandir}/*/man1/dpkg-name.1.gz +%{_mandir}/*/man1/dpkg-parsechangelog.1.gz +%{_mandir}/*/man1/dpkg-scanpackages.1.gz +%{_mandir}/*/man1/dpkg-scansources.1.gz +%{_mandir}/*/man1/dpkg-shlibdeps.1.gz +%{_mandir}/*/man1/dpkg-source.1.gz +%{_mandir}/*/man1/dpkg-vendor.1.gz +%{_mandir}/*/man5/deb-control.5.gz +%{_mandir}/*/man5/deb-extra-override.5.gz +%{_mandir}/*/man5/deb-old.5.gz +%{_mandir}/*/man5/deb-origin.5.gz +%{_mandir}/*/man5/deb-override.5.gz +%{_mandir}/*/man5/deb-shlibs.5.gz +%{_mandir}/*/man5/deb-split.5.gz +%{_mandir}/*/man5/deb-src-control.5.gz +%{_mandir}/*/man5/deb-substvars.5.gz +%{_mandir}/*/man5/deb-symbols.5.gz +%{_mandir}/*/man5/deb-triggers.5.gz +%{_mandir}/*/man5/deb-version.5.gz +%{_mandir}/*/man5/deb.5.gz + +%files perl +%defattr(-,root,root,-) +%dir %{_libdir}/dpkg/parsechangelog +%{_libdir}/dpkg/parsechangelog/* + +#FIXME other imbarecing exclude why we should exclude this one ? +#exclude %{perl_vendorlib}/Dpkg/Gettext.pm +%{perl_vendorlib}/Dpkg/*.pm +%{perl_vendorlib}/Dpkg/Changelog +%{perl_vendorlib}/Dpkg/Shlibs +%{perl_vendorlib}/Dpkg/Source +%{perl_vendorlib}/Dpkg/Vendor +%{perl_vendorlib}/Dpkg/Control +%{perl_vendorlib}/Dpkg/Compression/*.pm +%{perl_vendorlib}/Dpkg/Interface/*.pm + +%{_mandir}/man3/Dpkg::BuildEnv.3.gz +%{_mandir}/man3/Dpkg::BuildFlags.3.gz +%{_mandir}/man3/Dpkg::BuildOptions.3.gz +%{_mandir}/man3/Dpkg::Changelog.3.gz +%{_mandir}/man3/Dpkg::Changelog::Debian.3.gz +%{_mandir}/man3/Dpkg::Changelog::Entry.3.gz +%{_mandir}/man3/Dpkg::Changelog::Entry::Debian.3.gz +%{_mandir}/man3/Dpkg::Changelog::Parse.3.gz +%{_mandir}/man3/Dpkg::Checksums.3.gz +%{_mandir}/man3/Dpkg::Compression.3.gz +%{_mandir}/man3/Dpkg::Compression::FileHandle.3.gz +%{_mandir}/man3/Dpkg::Compression::Process.3.gz +%{_mandir}/man3/Dpkg::Conf.3.gz +%{_mandir}/man3/Dpkg::Control.3.gz +%{_mandir}/man3/Dpkg::Control::Changelog.3.gz +%{_mandir}/man3/Dpkg::Control::Fields.3.gz +%{_mandir}/man3/Dpkg::Control::Hash.3.gz +%{_mandir}/man3/Dpkg::Control::Info.3.gz +%{_mandir}/man3/Dpkg::Control::Types.3.gz +%{_mandir}/man3/Dpkg::Deps.3.gz +%{_mandir}/man3/Dpkg::IPC.3.gz +%{_mandir}/man3/Dpkg::Index.3.gz +%{_mandir}/man3/Dpkg::Interface::Storable.3.gz +%{_mandir}/man3/Dpkg::Path.3.gz +%{_mandir}/man3/Dpkg::Source::Package.3.gz +%{_mandir}/man3/Dpkg::Substvars.3.gz +%{_mandir}/man3/Dpkg::Vendor.3.gz +%{_mandir}/man3/Dpkg::Vendor::Debian.3.gz +%{_mandir}/man3/Dpkg::Vendor::Default.3.gz +%{_mandir}/man3/Dpkg::Vendor::Ubuntu.3.gz +%{_mandir}/man3/Dpkg::Version.3.gz %files -n dselect -f dselect.lang @@ -199,12 +355,33 @@ rm -rf $RPM_BUILD_ROOT %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt %{_bindir}/dselect %{perl_vendorlib}/Debian -%{_datadir}/dpkg/methods -%{_mandir}/man*/dselect*.gz +%{_libdir}/dpkg/methods +%{_mandir}/man1/dselect.1.gz +%{_mandir}/*/man1/dselect.1.gz +%{_mandir}/man5/dselect.cfg.5.gz +%{_mandir}/*/man5/dselect.cfg.5.gz %changelog +* Thu May 16 2013 Sérgio Basto - 1.16.10-1 +- Add BR perl-podlators for pod2man in F19 development or just BR perl +- Add some other importants BR: doxygen flex xz-devel po4a dotconf-devel +- Fix packages names which are debianized, so packages will be: dpkg-perl +and dpkg-dev (and dpkg-devel for headers of dpkg). +- Some clean ups. + +* Sat May 4 2013 Oron Peled +- Bump version to Debian/wheezy +- Call autoreconf: make sure we don't reuse Debian packaged + stuff (config.guess, etc.) +- CVE patches not needed -- is already fixed upstream +- Removed dpkg-change-libdir.patch: + - Patching Makefile.in is wrong (can patch Makefile.am with autoreconf) + - Less patch churn for non-critical paths + - Accept /usr/lib/dpkg/parsechangelog + - Accept /usr/lib/dpkg/methods + * Wed Feb 13 2013 Fedora Release Engineering - 1.15.5.6-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/fedora-bug642160-empty-argv.patch b/fedora-bug642160-empty-argv.patch deleted file mode 100644 index 86528a3..0000000 --- a/fedora-bug642160-empty-argv.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm dpkg-1.15.5.6/scripts/Dpkg/Arch.pm ---- dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm 2010-01-08 08:00:34.000000000 +0000 -+++ dpkg-1.15.5.6/scripts/Dpkg/Arch.pm 2010-10-17 12:29:46.916000478 +0100 -@@ -47,8 +47,9 @@ - return $build_arch if defined $build_arch; - - my $build_arch = `dpkg --print-architecture`; -- # FIXME: Handle bootstrapping -- syserr("dpkg --print-architecture failed") if $? >> 8; -+ if ($? >> 8 || $build_arch =~ /^\s*$/) { -+ $build_arch = get_raw_host_arch(); -+ } - - chomp $build_arch; - return $build_arch; diff --git a/fedora-fix-CVE-2010-0396-00.patch b/fedora-fix-CVE-2010-0396-00.patch deleted file mode 100644 index 6f9fc07..0000000 --- a/fedora-fix-CVE-2010-0396-00.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm ---- a/scripts/Dpkg/Source/Patch.pm -+++ b/scripts/Dpkg/Source/Patch.pm -@@ -322,8 +322,9 @@ sub analyze { - error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); - } - $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { -+ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { - $fn = $_; -+ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; - } - if (/\.dpkg-orig$/) { - error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); -@@ -336,8 +337,9 @@ sub analyze { - error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); - } - $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { -+ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { - $fn2 = $_; -+ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; - } else { - unless (defined $fn) { - error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), -@@ -363,6 +365,17 @@ sub analyze { - if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { - $dirtocreate{$dirname} = 1; - } -+ -+ # Sanity check, refuse to patch through a symlink -+ $dirname = $fn; -+ while (1) { -+ if (-l $dirname) { -+ error(_g("diff %s modifies file %s through a symlink: %s"), -+ $diff, $fn, $dirname); -+ } -+ last unless $dirname =~ s{/[^/]+$}{}; -+ } -+ - if (-e $fn and not -f _) { - error(_g("diff `%s' patches something which is not a plain file"), $diff); - } diff --git a/fedora-fix-CVE-2010-0396-01.patch b/fedora-fix-CVE-2010-0396-01.patch deleted file mode 100644 index c862e05..0000000 --- a/fedora-fix-CVE-2010-0396-01.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm ---- a/scripts/Dpkg/Source/Package/V3/quilt.pm -+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm -@@ -123,6 +123,7 @@ sub read_patch_list { - } - } - next if $opts{"skip_auto"} and $_ eq $auto_patch; -+ error(_g("%s contains an insecure path: %s"), $file, $_) if m{(^|/)\.\./}; - push @patches, $_; - } - close(SERIES); diff --git a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch deleted file mode 100644 index 26ce08d..0000000 --- a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -119,7 +119,7 @@ - # Call tar extraction process - $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ]; - $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions', -- @{$opts{"options"}}, '-xkf', '-' ]; -+ @{$opts{"options"}}, '-xf', '-' ]; - fork_and_exec(%fork_opts); - $self->cleanup_after_open(); - -@@ -142,7 +142,7 @@ - closedir(D); - my $done = 0; - erasedir($dest); -- if (scalar(@entries) == 1 && -d "$tmp/$entries[0]") { -+ if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) { - rename("$tmp/$entries[0]", $dest) || - syserr(_g("Unable to rename %s to %s"), - "$tmp/$entries[0]", $dest); -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -115,7 +115,12 @@ - # Extract main tarball - info(_g("unpacking %s"), $tarfile); - my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); -- $tar->extract($newdirectory, no_fixperms => 1); -+ $tar->extract($newdirectory, no_fixperms => 1, -+ options => [ "--anchored", "--no-wildcards-match-slash", -+ "--exclude", "*/.pc", "--exclude", ".pc" ]); -+ # The .pc exclusion is only needed for 3.0 (quilt) and to avoid -+ # having an upstream tarball provide a directory with symlinks -+ # that would be blindly followed when applying the patches - - # Extract additional orig tarballs - foreach my $subdir (keys %origtar) { -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -313,11 +313,42 @@ - $header =~ s/\s.*// unless ($header =~ s/\t.*//); - return $header; - } -+ -+ sub intuit_file_patched { -+ my ($old, $new) = @_; -+ return $new unless defined $old; -+ return $old unless defined $new; -+ return $new if -e $new and not -e $old; -+ return $old if -e $old and not -e $new; -+ # We don't consider the case where both files are non-existent and -+ # where patch picks the one with the fewest directories to create -+ # since dpkg-source will pre-create the required directories -+ # -+ # Precalculate metrics used by patch -+ my ($tmp_o, $tmp_n) = ($old, $new); -+ my ($len_o, $len_n) = (length($old), length($new)); -+ $tmp_o =~ s{[/\\]+}{/}g; -+ $tmp_n =~ s{[/\\]+}{/}g; -+ my $nb_comp_o = ($tmp_o =~ tr{/}{/}); -+ my $nb_comp_n = ($tmp_n =~ tr{/}{/}); -+ $tmp_o =~ s{^.*/}{}; -+ $tmp_n =~ s{^.*/}{}; -+ my ($blen_o, $blen_n) = (length($tmp_o), length($tmp_n)); -+ # Decide like patch would -+ if ($nb_comp_o != $nb_comp_n) { -+ return ($nb_comp_o < $nb_comp_n) ? $old : $new; -+ } elsif ($blen_o != $blen_n) { -+ return ($blen_o < $blen_n) ? $old : $new; -+ } elsif ($len_o != $len_n) { -+ return ($len_o < $len_n) ? $old : $new; -+ } -+ return $old; -+ } - $_ = getline($diff_handle); - - HUNK: - while (defined($_) || not eof($diff_handle)) { -- my ($fn, $fn2); -+ my (%path, %fn); - # skip comments leading up to patch (if any) - until (/^--- /) { - last HUNK if not defined($_ = getline($diff_handle)); -@@ -327,11 +358,8 @@ - unless(s/^--- //) { - error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); - } -- $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { -- $fn = $_; -- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; -- } -+ $path{'old'} = $_ = strip_ts($_); -+ $fn{'old'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; - if (/\.dpkg-orig$/) { - error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); - } -@@ -342,46 +370,47 @@ - unless (s/^\+\+\+ //) { - error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); - } -- $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { -- $fn2 = $_; -- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; -- } else { -- unless (defined $fn) { -- error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), -- $diff, $.); -- } -- } -+ $path{'new'} = $_ = strip_ts($_); -+ $fn{'new'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; -+ -+ unless (defined $fn{'old'} or defined $fn{'new'}) { -+ error(_g("none of the filenames in ---/+++ are valid in diff '%s' (line %d)"), -+ $diff, $.); -+ } - -- if (defined($fn) and $fn eq '/dev/null') { -+ # Safety checks on both filenames that patch could use -+ foreach my $key ("old", "new") { -+ next unless defined $fn{$key}; -+ if ($path{$key} =~ m{/\.\./}) { -+ error(_g("%s contains an insecure path: %s"), $diff, $path{$key}); -+ } -+ my $path = $fn{$key}; -+ while (1) { -+ if (-l $path) { -+ error(_g("diff %s modifies file %s through a symlink: %s"), -+ $diff, $fn{$key}, $path); -+ } -+ last unless $path =~ s{/+[^/]*$}{}; -+ last if length($path) <= length($destdir); # $destdir is assumed safe -+ } -+ } -+ -+ if ($path{'old'} eq '/dev/null' and $path{'new'} eq '/dev/null') { - error(_g("original and modified files are /dev/null in diff `%s' (line %d)"), -- $diff, $.) if (defined($fn2) and $fn2 eq '/dev/null'); -- $fn = $fn2; -- } elsif (defined($fn2) and $fn2 ne '/dev/null') { -- $fn = $fn2 unless defined $fn; -- $fn = $fn2 if ((not -e $fn) and -e $fn2); -- } elsif (defined($fn2) and $fn2 eq '/dev/null') { -+ $diff, $.); -+ } elsif ($path{'new'} eq '/dev/null') { - error(_g("file removal without proper filename in diff `%s' (line %d)"), -- $diff, $. - 1) unless defined $fn; -+ $diff, $. - 1) unless defined $fn{'old'}; - warning(_g("diff %s removes a non-existing file %s (line %d)"), -- $diff, $fn, $.) unless -e $fn; -+ $diff, $fn{'old'}, $.) unless -e $fn{'old'}; - } -+ my $fn = intuit_file_patched($fn{'old'}, $fn{'new'}); - - my $dirname = $fn; - if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { - $dirtocreate{$dirname} = 1; - } - -- # Sanity check, refuse to patch through a symlink -- $dirname = $fn; -- while (1) { -- if (-l $dirname) { -- error(_g("diff %s modifies file %s through a symlink: %s"), -- $diff, $fn, $dirname); -- } -- last unless $dirname =~ s{/[^/]+$}{}; -- } -- - if (-e $fn and not -f _) { - error(_g("diff `%s' patches something which is not a plain file"), $diff); - } From e60c534d7d5f16845375b897f4065c65f1a9e36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Thu, 16 May 2013 08:36:09 +0100 Subject: [PATCH 028/102] source uploaded --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0d52732..6aed7fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.15.5.6.tar.bz2 +/dpkg_1.16.10.tar.xz diff --git a/sources b/sources index a8b1462..3930d6a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4dcb0de9af234d16a62272bcc61b8873 dpkg_1.15.5.6.tar.bz2 +a20a06a5272717274a8b009368f237da dpkg_1.16.10.tar.xz From 50f433789208236e480bff42da9e55438ee18d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Thu, 16 May 2013 09:00:30 +0100 Subject: [PATCH 029/102] Add BR perl-podlators for pod2man in F19 development or just BR perl - Add some other importants BR: doxygen flex xz-devel po4a dotconf-devel - Fix packages names which are debianized, so packages will be: dpkg-perl and dpkg-dev (and dpkg-devel for headers of dpkg). - Some clean ups. - dpkg-perl must be arched. --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 79b0638..27a3b2e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -54,7 +54,6 @@ Summary: Debian package development tools Group: Development/System Requires: dpkg-perl = %{version}-%{release} Requires: patch, make, binutils, bzip2, lzma, xz -BuildArch: noarch %description -n dpkg-dev This package provides the development tools (including dpkg-source). @@ -370,6 +369,7 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info - Fix packages names which are debianized, so packages will be: dpkg-perl and dpkg-dev (and dpkg-devel for headers of dpkg). - Some clean ups. +- dpkg-perl must be arched. * Sat May 4 2013 Oron Peled - Bump version to Debian/wheezy From 6ed52ede3975d56e36e2876db924c8dc2f530ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Thu, 16 May 2013 12:58:12 +0100 Subject: [PATCH 030/102] Now - dpkg-perl must be arched. --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 27a3b2e..456e119 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -54,6 +54,7 @@ Summary: Debian package development tools Group: Development/System Requires: dpkg-perl = %{version}-%{release} Requires: patch, make, binutils, bzip2, lzma, xz +BuildArch: noarch %description -n dpkg-dev This package provides the development tools (including dpkg-source). @@ -64,7 +65,6 @@ Summary: Dpkg perl modules Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: perl, perl-TimeDate -BuildArch: noarch %description perl This package provides the perl modules used by the scripts From 710d25f2ec743a7a0063f873ca0a06d7fe52d127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Fri, 17 May 2013 21:57:38 +0100 Subject: [PATCH 031/102] Now - dpkg-perl must be arched. --- dpkg-perl-libexecdir.patch | 21 +++++++++++++++++++++ dpkg.spec | 12 +++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 dpkg-perl-libexecdir.patch diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch new file mode 100644 index 0000000..8a8fbff --- /dev/null +++ b/dpkg-perl-libexecdir.patch @@ -0,0 +1,21 @@ +diff -up ./scripts/Makefile.am.orig ./scripts/Makefile.am +--- ./scripts/Makefile.am.orig 2013-05-17 02:17:58.619324599 -0400 ++++ ./scripts/Makefile.am 2013-05-17 02:18:35.256329078 -0400 +@@ -21,7 +21,7 @@ bin_SCRIPTS = \ + dpkg-source \ + dpkg-vendor + +-changelogdir = $(pkglibdir)/parsechangelog ++changelogdir = $(pkglibexecdir)/parsechangelog + changelog_SCRIPTS = \ + changelog/debian + +@@ -115,7 +115,7 @@ man3_MANS = + + do_perl_subst = $(AM_V_GEN) \ + sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ +- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ ++ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ + -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ + -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ + -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" diff --git a/dpkg.spec b/dpkg.spec index 456e119..49ae53e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.16.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -12,6 +12,7 @@ Group: System Environment/Base License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz +Patch0: dpkg-perl-libexecdir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel @@ -65,6 +66,7 @@ Summary: Dpkg perl modules Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: perl, perl-TimeDate +BuildArch: noarch %description perl This package provides the perl modules used by the scripts @@ -97,6 +99,7 @@ dselect is a high-level interface for the installation/removal of debs . %prep %setup -q +%patch0 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -302,8 +305,8 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %files perl %defattr(-,root,root,-) -%dir %{_libdir}/dpkg/parsechangelog -%{_libdir}/dpkg/parsechangelog/* +%dir %{_libexecdir}/dpkg/parsechangelog +%{_libexecdir}/dpkg/parsechangelog/* #FIXME other imbarecing exclude why we should exclude this one ? #exclude %{perl_vendorlib}/Dpkg/Gettext.pm @@ -363,6 +366,9 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %changelog +* Fri May 17 2013 Sérgio Basto - 1.16.10-2 +- apply fix by Oron Peled bug #648384 + * Thu May 16 2013 Sérgio Basto - 1.16.10-1 - Add BR perl-podlators for pod2man in F19 development or just BR perl - Add some other importants BR: doxygen flex xz-devel po4a dotconf-devel From 8f610f5769c4a7aaaa4019c94d5ce46ccb810656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Fri, 17 May 2013 21:57:38 +0100 Subject: [PATCH 032/102] apply fix by Oron Peled bug #648384 --- dpkg-perl-libexecdir.patch | 21 +++++++++++++++++++++ dpkg.spec | 12 +++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 dpkg-perl-libexecdir.patch diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch new file mode 100644 index 0000000..8a8fbff --- /dev/null +++ b/dpkg-perl-libexecdir.patch @@ -0,0 +1,21 @@ +diff -up ./scripts/Makefile.am.orig ./scripts/Makefile.am +--- ./scripts/Makefile.am.orig 2013-05-17 02:17:58.619324599 -0400 ++++ ./scripts/Makefile.am 2013-05-17 02:18:35.256329078 -0400 +@@ -21,7 +21,7 @@ bin_SCRIPTS = \ + dpkg-source \ + dpkg-vendor + +-changelogdir = $(pkglibdir)/parsechangelog ++changelogdir = $(pkglibexecdir)/parsechangelog + changelog_SCRIPTS = \ + changelog/debian + +@@ -115,7 +115,7 @@ man3_MANS = + + do_perl_subst = $(AM_V_GEN) \ + sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ +- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ ++ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ + -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ + -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ + -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" diff --git a/dpkg.spec b/dpkg.spec index 456e119..49ae53e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.16.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -12,6 +12,7 @@ Group: System Environment/Base License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz +Patch0: dpkg-perl-libexecdir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel @@ -65,6 +66,7 @@ Summary: Dpkg perl modules Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: perl, perl-TimeDate +BuildArch: noarch %description perl This package provides the perl modules used by the scripts @@ -97,6 +99,7 @@ dselect is a high-level interface for the installation/removal of debs . %prep %setup -q +%patch0 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -302,8 +305,8 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %files perl %defattr(-,root,root,-) -%dir %{_libdir}/dpkg/parsechangelog -%{_libdir}/dpkg/parsechangelog/* +%dir %{_libexecdir}/dpkg/parsechangelog +%{_libexecdir}/dpkg/parsechangelog/* #FIXME other imbarecing exclude why we should exclude this one ? #exclude %{perl_vendorlib}/Dpkg/Gettext.pm @@ -363,6 +366,9 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %changelog +* Fri May 17 2013 Sérgio Basto - 1.16.10-2 +- apply fix by Oron Peled bug #648384 + * Thu May 16 2013 Sérgio Basto - 1.16.10-1 - Add BR perl-podlators for pod2man in F19 development or just BR perl - Add some other importants BR: doxygen flex xz-devel po4a dotconf-devel From d392a2e731c1ca7fd7b4cd3beec5dca8cfc0c624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 May 2013 23:25:29 +0100 Subject: [PATCH 033/102] Copied from dpkg-1.16.10/debian/dpkg.postinst, on post install, runs create_database, create_logfile. - Based on dpkg.install and dselect.install created some missing directories in /var/lib/dpkg and in /etc/dpkg . - Drop Requirement dpkg of dpkg-perl. - Fix a FIXME , all perls moved to dpkg-perl. - TODO: set logrotates, see debian/dpkg.logrotate. --- dpkg.logrotate | 18 +++++++++++++++ dpkg.spec | 60 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 dpkg.logrotate diff --git a/dpkg.logrotate b/dpkg.logrotate new file mode 100644 index 0000000..b071698 --- /dev/null +++ b/dpkg.logrotate @@ -0,0 +1,18 @@ +/var/log/dpkg.log { + monthly + rotate 12 + compress + delaycompress + missingok + notifempty + create 644 root root +} +/var/log/alternatives.log { + monthly + rotate 12 + compress + delaycompress + missingok + notifempty + create 644 root root +} diff --git a/dpkg.spec b/dpkg.spec index 49ae53e..3f25a1c 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.16.10 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -13,7 +13,6 @@ License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch0: dpkg-perl-libexecdir.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel BuildRequires: doxygen flex xz-devel po4a dotconf-devel @@ -64,7 +63,6 @@ Required to unpack, build and upload Debian source packages %package perl Summary: Dpkg perl modules Group: System Environment/Base -Requires: %{name} = %{version}-%{release} Requires: perl, perl-TimeDate BuildArch: noarch @@ -144,10 +142,42 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ #FIXME should we remove this ? rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info +mkdir -p %{buildroot}/var/lib/dpkg/alternatives %{buildroot}/var/lib/dpkg/info \ + %{buildroot}/var/lib/dpkg/parts %{buildroot}/var/lib/dpkg/updates \ + %{buildroot}/var/lib/dpkg/methods + +mkdir -p %{buildroot}/%{_sysconfdir}/dpkg/dpkg.cfg.d %{buildroot}/%{_sysconfdir}/dpkg/dselect.cfg.d + + +%post +# from dpkg.postinst +# Create the database files if they don't already exist +create_database() { + admindir=${DPKG_ADMINDIR:-/var/lib/dpkg} + + for file in diversions statoverride status; do + if [ ! -f "$admindir/$file" ]; then + touch "$admindir/$file" + fi + done +} + +# Create log file and set default permissions if possible +create_logfile() { + logfile=/var/log/dpkg.log + touch $logfile + chmod 644 $logfile + chown root:root $logfile 2>/dev/null || chown 0:0 $logfile +} +create_database +create_logfile + + %files -f dpkg.lang %defattr(-,root,root,-) %doc debian/changelog README AUTHORS COPYING THANKS TODO %dir %{_sysconfdir}/dpkg +%dir %{_sysconfdir}/dpkg/dpkg.cfg.d %config(noreplace) %{_sysconfdir}/dpkg.cfg %{_bindir}/dpkg %{_bindir}/dpkg-deb @@ -164,9 +194,10 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %{_datadir}/dpkg/cputable %{_datadir}/dpkg/ostable %{_datadir}/dpkg/triplettable -%{perl_vendorlib}/Dpkg.pm -%dir %{perl_vendorlib}/Dpkg -%{perl_vendorlib}/Dpkg/Gettext.pm +%dir /var/lib/dpkg/alternatives +%dir /var/lib/dpkg/info +%dir /var/lib/dpkg/parts +%dir /var/lib/dpkg/updates %{_mandir}/man1/dpkg.1.gz %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz @@ -308,8 +339,8 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %dir %{_libexecdir}/dpkg/parsechangelog %{_libexecdir}/dpkg/parsechangelog/* -#FIXME other imbarecing exclude why we should exclude this one ? -#exclude %{perl_vendorlib}/Dpkg/Gettext.pm +%dir %{perl_vendorlib}/Dpkg +%{perl_vendorlib}/Dpkg.pm %{perl_vendorlib}/Dpkg/*.pm %{perl_vendorlib}/Dpkg/Changelog %{perl_vendorlib}/Dpkg/Shlibs @@ -362,12 +393,21 @@ rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info %{_mandir}/*/man1/dselect.1.gz %{_mandir}/man5/dselect.cfg.5.gz %{_mandir}/*/man5/dselect.cfg.5.gz - +%dir %{_sysconfdir}/dpkg/dselect.cfg.d +/var/lib/dpkg/methods %changelog +* Tue May 21 2013 Sérgio Basto - 1.16.10-3 +- Copied from dpkg-1.16.10/debian/dpkg.postinst, on post install, runs create_database, create_logfile. +- Based on dpkg.install and dselect.install + created some missing directories in /var/lib/dpkg and in /etc/dpkg . +- Drop Requirement dpkg of dpkg-perl. +- Fix a FIXME , all perls moved to dpkg-perl. +- TODO: set logrotates, see debian/dpkg.logrotate. + * Fri May 17 2013 Sérgio Basto - 1.16.10-2 -- apply fix by Oron Peled bug #648384 +- apply fix by Oron Peled bug #648384, adds dpkg-perl as noarch * Thu May 16 2013 Sérgio Basto - 1.16.10-1 - Add BR perl-podlators for pod2man in F19 development or just BR perl From a319cd7433705ab1ec23594cbf5c95b5475f65f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sun, 2 Jun 2013 23:51:32 +0100 Subject: [PATCH 034/102] provided virtual -static package rhbz #967215 --- dpkg.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 3f25a1c..eacf9f8 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,6 @@ Name: dpkg Version: 1.16.10 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -40,6 +40,7 @@ because packages dependencies will likely be unmet. %package devel Summary: Debian package management static library Group: Development/System +Provides: dpkg-static = %{version}-%{release} %description devel This package provides the header files and static library necessary to @@ -398,6 +399,9 @@ create_logfile %changelog +* Sun Jun 02 2013 Sérgio Basto - 1.16.10-4 +- provided virtual -static package rhbz #967215 + * Tue May 21 2013 Sérgio Basto - 1.16.10-3 - Copied from dpkg-1.16.10/debian/dpkg.postinst, on post install, runs create_database, create_logfile. - Based on dpkg.install and dselect.install From 5b269e7b6ffcbb9e029d3af15ffbdee0e9dc4223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sat, 29 Jun 2013 18:32:48 +0100 Subject: [PATCH 035/102] move from dpkg to dpkg-dev, rhbz #979378 - dpkg-mergechangelogs and its man-pages - dpkg-buildflags and its man-pages - remove man pages dups, also rhbz #979378 dpkg-architecture.1.gz dpkg-buildflags.1.gz dpkg-buildpackage.1.gz dpkg-checkbuilddeps.1.gz dpkg-distaddfile.1.gz dpkg-genchanges.1.gz dpkg-gencontrol.1.gz dpkg-gensymbols.1.gz dpkg-mergechangelogs.1.gz dpkg-name.1.gz dpkg-parsechangelog.1.gz dpkg-scanpackages.1.gz dpkg-scansources.1.gz dpkg-shlibdeps.1.gz dpkg-source.1.gz dpkg-vendor.1.gz --- dpkg.spec | 70 +++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index eacf9f8..ea5dd91 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -50,14 +50,14 @@ Note though, that the API is to be considered volatile, and might change at any time, use at your own risk. -%package -n dpkg-dev +%package dev Summary: Debian package development tools Group: Development/System Requires: dpkg-perl = %{version}-%{release} Requires: patch, make, binutils, bzip2, lzma, xz BuildArch: noarch -%description -n dpkg-dev +%description dev This package provides the development tools (including dpkg-source). Required to unpack, build and upload Debian source packages @@ -182,14 +182,12 @@ create_logfile %config(noreplace) %{_sysconfdir}/dpkg.cfg %{_bindir}/dpkg %{_bindir}/dpkg-deb +%{_bindir}/dpkg-maintscript-helper %{_bindir}/dpkg-query %{_bindir}/dpkg-split %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride -%{_bindir}/dpkg-buildflags -%{_bindir}/dpkg-maintscript-helper -%{_bindir}/dpkg-mergechangelogs %dir %{_datadir}/dpkg %{_datadir}/dpkg/archtable %{_datadir}/dpkg/cputable @@ -200,52 +198,20 @@ create_logfile %dir /var/lib/dpkg/parts %dir /var/lib/dpkg/updates %{_mandir}/man1/dpkg.1.gz -%{_mandir}/man1/dpkg-architecture.1.gz -%{_mandir}/man1/dpkg-buildflags.1.gz -%{_mandir}/man1/dpkg-buildpackage.1.gz -%{_mandir}/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/man1/dpkg-deb.1.gz -%{_mandir}/man1/dpkg-distaddfile.1.gz -%{_mandir}/man1/dpkg-genchanges.1.gz -%{_mandir}/man1/dpkg-gencontrol.1.gz -%{_mandir}/man1/dpkg-gensymbols.1.gz %{_mandir}/man1/dpkg-maintscript-helper.1.gz -%{_mandir}/man1/dpkg-mergechangelogs.1.gz -%{_mandir}/man1/dpkg-name.1.gz -%{_mandir}/man1/dpkg-parsechangelog.1.gz %{_mandir}/man1/dpkg-query.1.gz -%{_mandir}/man1/dpkg-scanpackages.1.gz -%{_mandir}/man1/dpkg-scansources.1.gz -%{_mandir}/man1/dpkg-shlibdeps.1.gz -%{_mandir}/man1/dpkg-source.1.gz %{_mandir}/man1/dpkg-split.1.gz %{_mandir}/man1/dpkg-trigger.1.gz -%{_mandir}/man1/dpkg-vendor.1.gz %{_mandir}/man5/dpkg.cfg.5.gz %{_mandir}/man8/dpkg-divert.8.gz %{_mandir}/man8/dpkg-statoverride.8.gz %{_mandir}/*/man1/dpkg.1.gz -%{_mandir}/*/man1/dpkg-architecture.1.gz -%{_mandir}/*/man1/dpkg-buildflags.1.gz -%{_mandir}/*/man1/dpkg-buildpackage.1.gz -%{_mandir}/*/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/*/man1/dpkg-deb.1.gz -%{_mandir}/*/man1/dpkg-distaddfile.1.gz -%{_mandir}/*/man1/dpkg-genchanges.1.gz -%{_mandir}/*/man1/dpkg-gencontrol.1.gz -%{_mandir}/*/man1/dpkg-gensymbols.1.gz %{_mandir}/*/man1/dpkg-maintscript-helper.1.gz -%{_mandir}/*/man1/dpkg-mergechangelogs.1.gz -%{_mandir}/*/man1/dpkg-name.1.gz -%{_mandir}/*/man1/dpkg-parsechangelog.1.gz %{_mandir}/*/man1/dpkg-query.1.gz -%{_mandir}/*/man1/dpkg-scanpackages.1.gz -%{_mandir}/*/man1/dpkg-scansources.1.gz -%{_mandir}/*/man1/dpkg-shlibdeps.1.gz -%{_mandir}/*/man1/dpkg-source.1.gz %{_mandir}/*/man1/dpkg-split.1.gz %{_mandir}/*/man1/dpkg-trigger.1.gz -%{_mandir}/*/man1/dpkg-vendor.1.gz %{_mandir}/*/man5/dpkg.cfg.5.gz %{_mandir}/*/man8/dpkg-divert.8.gz %{_mandir}/*/man8/dpkg-statoverride.8.gz @@ -256,16 +222,18 @@ create_logfile %{_libdir}/pkgconfig/libdpkg.pc %{_includedir}/dpkg/*.h -%files -n dpkg-dev -f dpkg-dev.lang +%files dev -f dpkg-dev.lang %defattr(-,root,root,-) %doc doc/README.api %{_bindir}/dpkg-architecture %{_bindir}/dpkg-buildpackage +%{_bindir}/dpkg-buildflags %{_bindir}/dpkg-checkbuilddeps %{_bindir}/dpkg-distaddfile %{_bindir}/dpkg-genchanges %{_bindir}/dpkg-gencontrol %{_bindir}/dpkg-gensymbols +%{_bindir}/dpkg-mergechangelogs %{_bindir}/dpkg-name %{_bindir}/dpkg-parsechangelog %{_bindir}/dpkg-scanpackages @@ -281,12 +249,14 @@ create_logfile %{_datadir}/dpkg/pkg-info.mk %{_datadir}/dpkg/vendor.mk %{_mandir}/man1/dpkg-architecture.1.gz +%{_mandir}/man1/dpkg-buildflags.1.gz %{_mandir}/man1/dpkg-buildpackage.1.gz %{_mandir}/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/man1/dpkg-distaddfile.1.gz %{_mandir}/man1/dpkg-genchanges.1.gz %{_mandir}/man1/dpkg-gencontrol.1.gz %{_mandir}/man1/dpkg-gensymbols.1.gz +%{_mandir}/man1/dpkg-mergechangelogs.1.gz %{_mandir}/man1/dpkg-name.1.gz %{_mandir}/man1/dpkg-parsechangelog.1.gz %{_mandir}/man1/dpkg-scanpackages.1.gz @@ -309,11 +279,13 @@ create_logfile %{_mandir}/man5/deb.5.gz %{_mandir}/*/man1/dpkg-architecture.1.gz %{_mandir}/*/man1/dpkg-buildpackage.1.gz +%{_mandir}/*/man1/dpkg-buildflags.1.gz %{_mandir}/*/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/*/man1/dpkg-distaddfile.1.gz %{_mandir}/*/man1/dpkg-genchanges.1.gz %{_mandir}/*/man1/dpkg-gencontrol.1.gz %{_mandir}/*/man1/dpkg-gensymbols.1.gz +%{_mandir}/*/man1/dpkg-mergechangelogs.1.gz %{_mandir}/*/man1/dpkg-name.1.gz %{_mandir}/*/man1/dpkg-parsechangelog.1.gz %{_mandir}/*/man1/dpkg-scanpackages.1.gz @@ -399,6 +371,28 @@ create_logfile %changelog +* Sat Jun 29 2013 Sérgio Basto +- move from dpkg to dpkg-dev, rhbz #979378 + - dpkg-mergechangelogs and its man-pages + - dpkg-buildflags and its man-pages +- remove man pages dups, also rhbz #979378 + dpkg-architecture.1.gz + dpkg-buildflags.1.gz + dpkg-buildpackage.1.gz + dpkg-checkbuilddeps.1.gz + dpkg-distaddfile.1.gz + dpkg-genchanges.1.gz + dpkg-gencontrol.1.gz + dpkg-gensymbols.1.gz + dpkg-mergechangelogs.1.gz + dpkg-name.1.gz + dpkg-parsechangelog.1.gz + dpkg-scanpackages.1.gz + dpkg-scansources.1.gz + dpkg-shlibdeps.1.gz + dpkg-source.1.gz + dpkg-vendor.1.gz + * Sun Jun 02 2013 Sérgio Basto - 1.16.10-4 - provided virtual -static package rhbz #967215 From 6d0630eecf685c5fb9eb786ac48c0a10cc358ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sun, 30 Jun 2013 01:05:06 +0100 Subject: [PATCH 036/102] rhbz #979378 - Obsolete the old dpkg-devel.noarch (replaced by dpkg-dev) (Obsoletes: dpkg-devel < 1.16) - Readd to dpkg-perl: Requires: dpkg = %{version}-%{release} - Patchset Signed-off-by: Oron Peled - [PATCH 1/4] move dpkg.cfg from /etc to /etc/dpkg - [PATCH 2/4] fix some pkgdatadir, pkgconfdir file locations - [PATCH 3/4] move "dpkg-dev.mo" files to dpkg-perl - [PATCH 4/4] minor fix to dpkg-perl ownerships - move from dpkg to dpkg-dev, rhbz #979378 - dpkg-mergechangelogs and its man-pages - dpkg-buildflags and its man-pages - remove man pages dups, also rhbz #979378 dpkg-architecture.1.gz dpkg-buildflags.1.gz dpkg-buildpackage.1.gz dpkg-checkbuilddeps.1.gz dpkg-distaddfile.1.gz dpkg-genchanges.1.gz dpkg-gencontrol.1.gz dpkg-gensymbols.1.gz dpkg-mergechangelogs.1.gz dpkg-name.1.gz dpkg-parsechangelog.1.gz dpkg-scanpackages.1.gz dpkg-scansources.1.gz dpkg-shlibdeps.1.gz dpkg-source.1.gz dpkg-vendor.1.gz --- dpkg.spec | 112 +++++++++++++++++++++--------------------------------- 1 file changed, 43 insertions(+), 69 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index ea5dd91..c457755 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,9 @@ +%global pkgconfdir %{_sysconfdir}/dpkg +%global pkgdatadir %{_datadir}/dpkg + Name: dpkg Version: 1.16.10 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -55,6 +58,7 @@ Summary: Debian package development tools Group: Development/System Requires: dpkg-perl = %{version}-%{release} Requires: patch, make, binutils, bzip2, lzma, xz +Obsoletes: dpkg-devel < 1.16 BuildArch: noarch %description dev @@ -64,6 +68,7 @@ Required to unpack, build and upload Debian source packages %package perl Summary: Dpkg perl modules Group: System Environment/Base +Requires: dpkg = %{version}-%{release} Requires: perl, perl-TimeDate BuildArch: noarch @@ -125,9 +130,15 @@ make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT +mkdir -p %{buildroot}/%{pkgconfdir}/dpkg.cfg.d +mkdir -p %{buildroot}/%{pkgconfdir}/dselect.cfg.d + # from debian/dpkg.install -install -pm0644 debian/archtable $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable -install -pm0644 debian/dpkg.cfg $RPM_BUILD_ROOT/%{_sysconfdir}/dpkg.cfg +install -pm0644 debian/archtable $RPM_BUILD_ROOT/%{pkgdatadir}/archtable +install -pm0644 debian/dpkg.cfg $RPM_BUILD_ROOT/%{pkgconfdir} +install -pm0644 debian/shlibs.default $RPM_BUILD_ROOT/%{pkgconfdir} +install -pm0644 debian/shlibs.override $RPM_BUILD_ROOT/%{pkgconfdir} + %find_lang dpkg %find_lang dpkg-dev @@ -147,8 +158,6 @@ mkdir -p %{buildroot}/var/lib/dpkg/alternatives %{buildroot}/var/lib/dpkg/info \ %{buildroot}/var/lib/dpkg/parts %{buildroot}/var/lib/dpkg/updates \ %{buildroot}/var/lib/dpkg/methods -mkdir -p %{buildroot}/%{_sysconfdir}/dpkg/dpkg.cfg.d %{buildroot}/%{_sysconfdir}/dpkg/dselect.cfg.d - %post # from dpkg.postinst @@ -177,9 +186,9 @@ create_logfile %files -f dpkg.lang %defattr(-,root,root,-) %doc debian/changelog README AUTHORS COPYING THANKS TODO -%dir %{_sysconfdir}/dpkg -%dir %{_sysconfdir}/dpkg/dpkg.cfg.d -%config(noreplace) %{_sysconfdir}/dpkg.cfg +%dir %{pkgconfdir} +%dir %{pkgconfdir}/dpkg.cfg.d +%config(noreplace) %{pkgconfdir}/dpkg.cfg %{_bindir}/dpkg %{_bindir}/dpkg-deb %{_bindir}/dpkg-maintscript-helper @@ -188,11 +197,12 @@ create_logfile %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride -%dir %{_datadir}/dpkg -%{_datadir}/dpkg/archtable -%{_datadir}/dpkg/cputable -%{_datadir}/dpkg/ostable -%{_datadir}/dpkg/triplettable +%dir %{pkgdatadir} +%{pkgdatadir}/abitable +%{pkgdatadir}/archtable +%{pkgdatadir}/cputable +%{pkgdatadir}/ostable +%{pkgdatadir}/triplettable %dir /var/lib/dpkg/alternatives %dir /var/lib/dpkg/info %dir /var/lib/dpkg/parts @@ -222,9 +232,11 @@ create_logfile %{_libdir}/pkgconfig/libdpkg.pc %{_includedir}/dpkg/*.h -%files dev -f dpkg-dev.lang +%files dev %defattr(-,root,root,-) %doc doc/README.api +%config(noreplace) %{pkgconfdir}/shlibs.default +%config(noreplace) %{pkgconfdir}/shlibs.override %{_bindir}/dpkg-architecture %{_bindir}/dpkg-buildpackage %{_bindir}/dpkg-buildflags @@ -241,13 +253,7 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -# FIXME: what are these? -%{_datadir}/dpkg/abitable -%{_datadir}/dpkg/architecture.mk -%{_datadir}/dpkg/buildflags.mk -%{_datadir}/dpkg/default.mk -%{_datadir}/dpkg/pkg-info.mk -%{_datadir}/dpkg/vendor.mk +%{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz %{_mandir}/man1/dpkg-buildpackage.1.gz @@ -307,53 +313,12 @@ create_logfile %{_mandir}/*/man5/deb-version.5.gz %{_mandir}/*/man5/deb.5.gz -%files perl +%files perl -f dpkg-dev.lang %defattr(-,root,root,-) -%dir %{_libexecdir}/dpkg/parsechangelog -%{_libexecdir}/dpkg/parsechangelog/* - -%dir %{perl_vendorlib}/Dpkg -%{perl_vendorlib}/Dpkg.pm -%{perl_vendorlib}/Dpkg/*.pm -%{perl_vendorlib}/Dpkg/Changelog -%{perl_vendorlib}/Dpkg/Shlibs -%{perl_vendorlib}/Dpkg/Source -%{perl_vendorlib}/Dpkg/Vendor -%{perl_vendorlib}/Dpkg/Control -%{perl_vendorlib}/Dpkg/Compression/*.pm -%{perl_vendorlib}/Dpkg/Interface/*.pm - -%{_mandir}/man3/Dpkg::BuildEnv.3.gz -%{_mandir}/man3/Dpkg::BuildFlags.3.gz -%{_mandir}/man3/Dpkg::BuildOptions.3.gz -%{_mandir}/man3/Dpkg::Changelog.3.gz -%{_mandir}/man3/Dpkg::Changelog::Debian.3.gz -%{_mandir}/man3/Dpkg::Changelog::Entry.3.gz -%{_mandir}/man3/Dpkg::Changelog::Entry::Debian.3.gz -%{_mandir}/man3/Dpkg::Changelog::Parse.3.gz -%{_mandir}/man3/Dpkg::Checksums.3.gz -%{_mandir}/man3/Dpkg::Compression.3.gz -%{_mandir}/man3/Dpkg::Compression::FileHandle.3.gz -%{_mandir}/man3/Dpkg::Compression::Process.3.gz -%{_mandir}/man3/Dpkg::Conf.3.gz -%{_mandir}/man3/Dpkg::Control.3.gz -%{_mandir}/man3/Dpkg::Control::Changelog.3.gz -%{_mandir}/man3/Dpkg::Control::Fields.3.gz -%{_mandir}/man3/Dpkg::Control::Hash.3.gz -%{_mandir}/man3/Dpkg::Control::Info.3.gz -%{_mandir}/man3/Dpkg::Control::Types.3.gz -%{_mandir}/man3/Dpkg::Deps.3.gz -%{_mandir}/man3/Dpkg::IPC.3.gz -%{_mandir}/man3/Dpkg::Index.3.gz -%{_mandir}/man3/Dpkg::Interface::Storable.3.gz -%{_mandir}/man3/Dpkg::Path.3.gz -%{_mandir}/man3/Dpkg::Source::Package.3.gz -%{_mandir}/man3/Dpkg::Substvars.3.gz -%{_mandir}/man3/Dpkg::Vendor.3.gz -%{_mandir}/man3/Dpkg::Vendor::Debian.3.gz -%{_mandir}/man3/Dpkg::Vendor::Default.3.gz -%{_mandir}/man3/Dpkg::Vendor::Ubuntu.3.gz -%{_mandir}/man3/Dpkg::Version.3.gz +%{_libexecdir}/dpkg/parsechangelog + +%{perl_vendorlib}/Dpkg* +%{_mandir}/man3/Dpkg*.3* %files -n dselect -f dselect.lang @@ -366,12 +331,21 @@ create_logfile %{_mandir}/*/man1/dselect.1.gz %{_mandir}/man5/dselect.cfg.5.gz %{_mandir}/*/man5/dselect.cfg.5.gz -%dir %{_sysconfdir}/dpkg/dselect.cfg.d +%dir %{pkgconfdir}/dselect.cfg.d /var/lib/dpkg/methods %changelog -* Sat Jun 29 2013 Sérgio Basto +* Sun Jun 30 2013 Sérgio Basto - 1.16.10-5 +- rhbz #979378 + - Obsolete the old dpkg-devel.noarch (replaced by dpkg-dev) + (Obsoletes: dpkg-devel < 1.16) + - Readd to dpkg-perl: Requires: dpkg = %{version}-%{release} + - Patchset Signed-off-by: Oron Peled + - [PATCH 1/4] move dpkg.cfg from /etc to /etc/dpkg + - [PATCH 2/4] fix some pkgdatadir, pkgconfdir file locations + - [PATCH 3/4] move "dpkg-dev.mo" files to dpkg-perl + - [PATCH 4/4] minor fix to dpkg-perl ownerships - move from dpkg to dpkg-dev, rhbz #979378 - dpkg-mergechangelogs and its man-pages - dpkg-buildflags and its man-pages From 80a4daf99457d4d7027e11505b8e35e029f9a5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Mon, 1 Jul 2013 04:17:37 +0100 Subject: [PATCH 037/102] add support to logrotate, by Oron Peled, rhbz #979378 - added some new %doc and debian/copyright, by Oron Peled, rhbz #979378 - rpmlint cleanups, by Oron Peled, rhbz #979378 --- dpkg-fix-logrotate.patch | 16 ++++++++++++++ dpkg.spec | 46 ++++++++++++++++++++++++++-------------- 2 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 dpkg-fix-logrotate.patch diff --git a/dpkg-fix-logrotate.patch b/dpkg-fix-logrotate.patch new file mode 100644 index 0000000..4a14ad6 --- /dev/null +++ b/dpkg-fix-logrotate.patch @@ -0,0 +1,16 @@ +diff -up ./debian/dpkg.logrotate.orig ./debian/dpkg.logrotate +--- ./debian/dpkg.logrotate.orig 2013-06-30 10:04:23.369382622 +0300 ++++ ./debian/dpkg.logrotate 2013-06-30 10:04:39.268407865 +0300 +@@ -7,12 +7,3 @@ + notifempty + create 644 root root + } +-/var/log/alternatives.log { +- monthly +- rotate 12 +- compress +- delaycompress +- missingok +- notifempty +- create 644 root root +-} diff --git a/dpkg.spec b/dpkg.spec index c457755..31d3df0 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,9 +1,9 @@ -%global pkgconfdir %{_sysconfdir}/dpkg -%global pkgdatadir %{_datadir}/dpkg +%global pkgconfdir %{_sysconfdir}/dpkg +%global pkgdatadir %{_datadir}/dpkg Name: dpkg Version: 1.16.10 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -16,6 +16,7 @@ License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch0: dpkg-perl-libexecdir.patch +Patch1: dpkg-fix-logrotate.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel BuildRequires: doxygen flex xz-devel po4a dotconf-devel @@ -104,6 +105,7 @@ dselect is a high-level interface for the installation/removal of debs . %prep %setup -q %patch0 -p1 +%patch1 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -128,16 +130,20 @@ make %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT +make install DESTDIR=%{buildroot} mkdir -p %{buildroot}/%{pkgconfdir}/dpkg.cfg.d mkdir -p %{buildroot}/%{pkgconfdir}/dselect.cfg.d # from debian/dpkg.install -install -pm0644 debian/archtable $RPM_BUILD_ROOT/%{pkgdatadir}/archtable -install -pm0644 debian/dpkg.cfg $RPM_BUILD_ROOT/%{pkgconfdir} -install -pm0644 debian/shlibs.default $RPM_BUILD_ROOT/%{pkgconfdir} -install -pm0644 debian/shlibs.override $RPM_BUILD_ROOT/%{pkgconfdir} +install -pm0644 debian/archtable %{buildroot}/%{pkgdatadir}/archtable +install -pm0644 debian/dpkg.cfg %{buildroot}/%{pkgconfdir} +install -pm0644 debian/shlibs.default %{buildroot}/%{pkgconfdir} +install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir} + +# patched debian/dpkg.logrotate +mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d +install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} %find_lang dpkg @@ -145,14 +151,14 @@ install -pm0644 debian/shlibs.override $RPM_BUILD_ROOT/%{pkgconfdir} %find_lang dselect # fedora has its own implementation -rm $RPM_BUILD_ROOT%{_bindir}/update-alternatives -rm $RPM_BUILD_ROOT%{_mandir}/man8/update-alternatives.8 -rm -rf $RPM_BUILD_ROOT%{_mandir}/*/man8/update-alternatives.8 -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ +rm %{buildroot}%{_bindir}/update-alternatives +rm %{buildroot}%{_mandir}/man8/update-alternatives.8 +rm -rf %{buildroot}%{_mandir}/*/man8/update-alternatives.8 +rm -rf %{buildroot}%{_sysconfdir}/alternatives/ #fedora has own implemenation #FIXME should we remove this ? -rm -rf $RPM_BUILD_ROOT%{_sbindir}/install-info +rm -rf %{buildroot}%{_sbindir}/install-info mkdir -p %{buildroot}/var/lib/dpkg/alternatives %{buildroot}/var/lib/dpkg/info \ %{buildroot}/var/lib/dpkg/parts %{buildroot}/var/lib/dpkg/updates \ @@ -185,10 +191,13 @@ create_logfile %files -f dpkg.lang %defattr(-,root,root,-) -%doc debian/changelog README AUTHORS COPYING THANKS TODO +%doc debian/changelog README AUTHORS THANKS TODO +%doc debian/copyright debian/usertags +%doc doc/README.feature-removal-schedule doc/triggers.txt %dir %{pkgconfdir} %dir %{pkgconfdir}/dpkg.cfg.d %config(noreplace) %{pkgconfdir}/dpkg.cfg +%config(noreplace) %{_sysconfdir}/logrotate.d/dpkg %{_bindir}/dpkg %{_bindir}/dpkg-deb %{_bindir}/dpkg-maintscript-helper @@ -234,7 +243,7 @@ create_logfile %files dev %defattr(-,root,root,-) -%doc doc/README.api +%doc doc/README.api doc/coding-style.txt doc/frontend.txt %config(noreplace) %{pkgconfdir}/shlibs.default %config(noreplace) %{pkgconfdir}/shlibs.override %{_bindir}/dpkg-architecture @@ -336,11 +345,16 @@ create_logfile %changelog +* Mon Jul 01 2013 Sérgio Basto - 1.16.10-6 +- add support to logrotate, by Oron Peled, rhbz #979378 +- added some new %doc and debian/copyright, by Oron Peled, rhbz #979378 +- rpmlint cleanups, by Oron Peled, rhbz #979378 + * Sun Jun 30 2013 Sérgio Basto - 1.16.10-5 - rhbz #979378 - Obsolete the old dpkg-devel.noarch (replaced by dpkg-dev) (Obsoletes: dpkg-devel < 1.16) - - Readd to dpkg-perl: Requires: dpkg = %{version}-%{release} + - Readd to dpkg-perl: Requires: dpkg = - - Patchset Signed-off-by: Oron Peled - [PATCH 1/4] move dpkg.cfg from /etc to /etc/dpkg - [PATCH 2/4] fix some pkgdatadir, pkgconfdir file locations From 7736882317be8ad0ed55e1bd0dcd2ae485d413f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 17 Jul 2013 16:15:18 +0200 Subject: [PATCH 038/102] Perl 5.18 rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 31d3df0..e0df308 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.16.10 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -345,6 +345,9 @@ create_logfile %changelog +* Wed Jul 17 2013 Petr Pisar - 1.16.10-7 +- Perl 5.18 rebuild + * Mon Jul 01 2013 Sérgio Basto - 1.16.10-6 - add support to logrotate, by Oron Peled, rhbz #979378 - added some new %doc and debian/copyright, by Oron Peled, rhbz #979378 From e93ecfb0fed8ddd4e986b4228f5a6dfd8d15a28b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 02:43:50 -0500 Subject: [PATCH 039/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index e0df308..26972bf 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.16.10 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -345,6 +345,9 @@ create_logfile %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 1.16.10-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Wed Jul 17 2013 Petr Pisar - 1.16.10-7 - Perl 5.18 rebuild From 4d60f7df47f4e11aa92c102872b469d14df8a221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Wed, 16 Oct 2013 18:53:00 +0100 Subject: [PATCH 040/102] Update to 1.16.12 - added /etc/dpkg/origins/... , by Oron Peled, rhbz #973832 - fix few files listed twice. --- .gitignore | 1 + dpkg.spec | 22 ++++++++++++++++++++-- sources | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6aed7fc..0fc1971 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.10.tar.xz +/dpkg_1.16.12.tar.xz diff --git a/dpkg.spec b/dpkg.spec index 26972bf..82a69da 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.16.10 -Release: 8%{?dist} +Version: 1.16.12 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -134,6 +134,17 @@ make install DESTDIR=%{buildroot} mkdir -p %{buildroot}/%{pkgconfdir}/dpkg.cfg.d mkdir -p %{buildroot}/%{pkgconfdir}/dselect.cfg.d +mkdir -p %{buildroot}/%{pkgconfdir}/origins + +# Prepare "vendor" files for dpkg-vendor +cat < %{buildroot}/%{pkgconfdir}/origins/fedora +Vendor: Fedora +Vendor-URL: http://www.fedoraproject.org/ +Bugs: https://bugzilla.redhat.com +EOF +%if 0%{?fedora} +ln -sf fedora %{buildroot}/%{pkgconfdir}/origins/default +%endif # from debian/dpkg.install install -pm0644 debian/archtable %{buildroot}/%{pkgdatadir}/archtable @@ -196,7 +207,9 @@ create_logfile %doc doc/README.feature-removal-schedule doc/triggers.txt %dir %{pkgconfdir} %dir %{pkgconfdir}/dpkg.cfg.d +%dir %{pkgconfdir}/origins %config(noreplace) %{pkgconfdir}/dpkg.cfg +%config(noreplace) %{pkgconfdir}/origins/* %config(noreplace) %{_sysconfdir}/logrotate.d/dpkg %{_bindir}/dpkg %{_bindir}/dpkg-deb @@ -345,6 +358,11 @@ create_logfile %changelog +* Wed Oct 16 2013 Sérgio Basto - 1.16.12-1 +- Update to 1.16.12 +- added /etc/dpkg/origins/... , by Oron Peled, rhbz #973832 +- fix few files listed twice. + * Sat Aug 03 2013 Fedora Release Engineering - 1.16.10-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 3930d6a..4054ecf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a20a06a5272717274a8b009368f237da dpkg_1.16.10.tar.xz +b7e9cac52ff7882b088a3058b52081b5 dpkg_1.16.12.tar.xz From 68cb450f465ba6a20daf2278a59d13a4d2ae2942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sat, 10 May 2014 10:42:01 +0100 Subject: [PATCH 041/102] Update to 1.16.14, fixes CVE-2014-0471, rhbz #1092210 . --- .gitignore | 1 + dpkg.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0fc1971..39843fd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.10.tar.xz /dpkg_1.16.12.tar.xz +/dpkg_1.16.14.tar.xz diff --git a/dpkg.spec b/dpkg.spec index 82a69da..9ff19a4 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,7 +2,7 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.16.12 +Version: 1.16.14 Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base @@ -358,6 +358,9 @@ create_logfile %changelog +* Sat May 10 2014 Sérgio Basto - 1.16.14-1 +- Update to 1.16.14, fixes CVE-2014-0471, rhbz #1092210 . + * Wed Oct 16 2013 Sérgio Basto - 1.16.12-1 - Update to 1.16.12 - added /etc/dpkg/origins/... , by Oron Peled, rhbz #973832 diff --git a/sources b/sources index 4054ecf..d61f7a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b7e9cac52ff7882b088a3058b52081b5 dpkg_1.16.12.tar.xz +235f4368451a8e696fc7d92007ff9125 dpkg_1.16.14.tar.xz From 40fd3fb8f95cf8b5535430f4f40b5a64e6773427 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 03:00:16 -0500 Subject: [PATCH 042/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 9ff19a4..3e80d65 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.16.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -358,6 +358,9 @@ create_logfile %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.16.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sat May 10 2014 Sérgio Basto - 1.16.14-1 - Update to 1.16.14, fixes CVE-2014-0471, rhbz #1092210 . From 76f484e6f58ef2bfe73e60cd20bc9abda6807299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Mon, 23 Jun 2014 04:08:40 +0100 Subject: [PATCH 043/102] Update to 1.16.15, fixes: CVE-2014-3864, CVE-2014-3865 , rhbz #1103026 --- .gitignore | 1 + dpkg.spec | 11 ++++++----- sources | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 39843fd..81f1999 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.10.tar.xz /dpkg_1.16.12.tar.xz /dpkg_1.16.14.tar.xz +/dpkg_1.16.15.tar.xz diff --git a/dpkg.spec b/dpkg.spec index 3e80d65..821f66e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.16.14 -Release: 2%{?dist} +Version: 1.16.15 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -275,6 +275,7 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor +%{_libdir}/dpkg/parsechangelog %{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz @@ -337,12 +338,9 @@ create_logfile %files perl -f dpkg-dev.lang %defattr(-,root,root,-) -%{_libexecdir}/dpkg/parsechangelog - %{perl_vendorlib}/Dpkg* %{_mandir}/man3/Dpkg*.3* - %files -n dselect -f dselect.lang %defattr(-,root,root,-) %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt @@ -358,6 +356,9 @@ create_logfile %changelog +* Mon Jun 23 2014 Sérgio Basto - 1.16.15-1 +- Update to 1.16.15, fixes: CVE-2014-3864, CVE-2014-3865 , rhbz #1103026 + * Sat Jun 07 2014 Fedora Release Engineering - 1.16.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index d61f7a0..6edc4fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -235f4368451a8e696fc7d92007ff9125 dpkg_1.16.14.tar.xz +0e7d105a57839cdab2b0bf5e3612442f dpkg_1.16.15.tar.xz From 20cf26c004316db768a1bc4c52708a3de3a72038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Mon, 23 Jun 2014 04:43:42 +0100 Subject: [PATCH 044/102] fix place of dpkg/parsechangelog --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 821f66e..45ae743 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -275,7 +275,7 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -%{_libdir}/dpkg/parsechangelog +%{_libexecdir}/dpkg/parsechangelog %{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz From a3475a378da0258b6c74b1036f56326b5efea5e6 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 09:41:18 +0000 Subject: [PATCH 045/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 45ae743..3f339f5 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.16.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -356,6 +356,9 @@ create_logfile %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 1.16.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Mon Jun 23 2014 Sérgio Basto - 1.16.15-1 - Update to 1.16.15, fixes: CVE-2014-3864, CVE-2014-3865 , rhbz #1103026 From 226ff8dc2e6fcfae1450ddfd93d6dd73cc962e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sun, 19 Apr 2015 20:25:02 +0100 Subject: [PATCH 046/102] Security update to 1.16.16 --- dpkg.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 3f339f5..857d282 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.16.15 -Release: 2%{?dist} +Version: 1.16.16 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -356,6 +356,9 @@ create_logfile %changelog +* Sun Apr 19 2015 Sérgio Basto - 1.16.16-1 +- Security update to 1.16.16 + * Sat Aug 16 2014 Fedora Release Engineering - 1.16.15-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 92f58e647cd753739bb12fe7cb32cf06410a7a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sun, 19 Apr 2015 20:27:54 +0100 Subject: [PATCH 047/102] Security update to 1.16.16 --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 81f1999..46d6960 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.12.tar.xz /dpkg_1.16.14.tar.xz /dpkg_1.16.15.tar.xz +/dpkg_1.16.16.tar.xz diff --git a/sources b/sources index 6edc4fd..13ad236 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0e7d105a57839cdab2b0bf5e3612442f dpkg_1.16.15.tar.xz +88d0e4c98ecb8afe6dee896a2aa9665d dpkg_1.16.16.tar.xz From bb213aa03a3c29fd51edb2c6aa67cb1217090996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 Apr 2015 02:55:21 +0100 Subject: [PATCH 048/102] some fixes and support for epel-6 --- dpkg-perl-libexecdir.patch | 21 --------------------- dpkg.logrotate | 18 ------------------ dpkg.spec | 16 +++++++++++----- 3 files changed, 11 insertions(+), 44 deletions(-) delete mode 100644 dpkg-perl-libexecdir.patch delete mode 100644 dpkg.logrotate diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch deleted file mode 100644 index 8a8fbff..0000000 --- a/dpkg-perl-libexecdir.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up ./scripts/Makefile.am.orig ./scripts/Makefile.am ---- ./scripts/Makefile.am.orig 2013-05-17 02:17:58.619324599 -0400 -+++ ./scripts/Makefile.am 2013-05-17 02:18:35.256329078 -0400 -@@ -21,7 +21,7 @@ bin_SCRIPTS = \ - dpkg-source \ - dpkg-vendor - --changelogdir = $(pkglibdir)/parsechangelog -+changelogdir = $(pkglibexecdir)/parsechangelog - changelog_SCRIPTS = \ - changelog/debian - -@@ -115,7 +115,7 @@ man3_MANS = - - do_perl_subst = $(AM_V_GEN) \ - sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ -- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ -+ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ - -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ - -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ - -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" diff --git a/dpkg.logrotate b/dpkg.logrotate deleted file mode 100644 index b071698..0000000 --- a/dpkg.logrotate +++ /dev/null @@ -1,18 +0,0 @@ -/var/log/dpkg.log { - monthly - rotate 12 - compress - delaycompress - missingok - notifempty - create 644 root root -} -/var/log/alternatives.log { - monthly - rotate 12 - compress - delaycompress - missingok - notifempty - create 644 root root -} diff --git a/dpkg.spec b/dpkg.spec index 857d282..4f4f12e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.16.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -15,11 +15,13 @@ Group: System Environment/Base License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz -Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel -BuildRequires: doxygen flex xz-devel po4a dotconf-devel +BuildRequires: doxygen flex xz-devel po4a +%if 0%{?rhel} != 5 && 0%{?rhel} != 6 +BuildRequires: dotconf-devel +%endif # for /usr/bin/pod2man %if 0%{?fedora} > 18 BuildRequires: perl-podlators @@ -104,7 +106,6 @@ dselect is a high-level interface for the installation/removal of debs . %prep %setup -q -%patch0 -p1 %patch1 -p1 # Filter unwanted Requires: @@ -118,7 +119,9 @@ EOF chmod +x %{__perl_requires} %build +%if 0%{?rhel} != 5 && 0%{?rhel} != 6 autoreconf -fiv +%endif %configure --disable-start-stop-daemon \ --disable-linker-optimisations \ --with-admindir=%{_localstatedir}/lib/dpkg \ @@ -275,7 +278,7 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -%{_libexecdir}/dpkg/parsechangelog +%{_libdir}/dpkg/parsechangelog %{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz @@ -356,6 +359,9 @@ create_logfile %changelog +* Tue Apr 21 2015 Sérgio Basto - 1.16.16-2 +- some fixes and support for epel-6 + * Sun Apr 19 2015 Sérgio Basto - 1.16.16-1 - Security update to 1.16.16 From 47e0b8fd29161bedae66c158fbbf777f91260a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 Apr 2015 04:18:29 +0100 Subject: [PATCH 049/102] move %{_libdir}/dpkg/parsechangelog to archable package --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 4f4f12e..4595c32 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -222,6 +222,7 @@ create_logfile %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride +%{_libdir}/dpkg/parsechangelog %dir %{pkgdatadir} %{pkgdatadir}/abitable %{pkgdatadir}/archtable @@ -278,7 +279,6 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -%{_libdir}/dpkg/parsechangelog %{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz From 14facc711ac5dde66d051f2f78e42d919e2d2d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 Apr 2015 04:57:59 +0100 Subject: [PATCH 050/102] real merge --- .gitignore | 5 + dpkg-change-libdir-path.patch | 268 ------------- dpkg.spec | 398 +++++++++++++++---- fedora-bug642160-empty-argv.patch | 15 - fedora-fix-CVE-2010-0396-00.patch | 43 -- fedora-fix-CVE-2010-0396-01.patch | 11 - fedora-fix-CVE-2010-1679_CVE-2011-0402.patch | 176 -------- sources | 2 +- 8 files changed, 337 insertions(+), 581 deletions(-) delete mode 100644 dpkg-change-libdir-path.patch delete mode 100644 fedora-bug642160-empty-argv.patch delete mode 100644 fedora-fix-CVE-2010-0396-00.patch delete mode 100644 fedora-fix-CVE-2010-0396-01.patch delete mode 100644 fedora-fix-CVE-2010-1679_CVE-2011-0402.patch diff --git a/.gitignore b/.gitignore index 0d52732..46d6960 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.15.5.6.tar.bz2 +/dpkg_1.16.10.tar.xz +/dpkg_1.16.12.tar.xz +/dpkg_1.16.14.tar.xz +/dpkg_1.16.15.tar.xz +/dpkg_1.16.16.tar.xz diff --git a/dpkg-change-libdir-path.patch b/dpkg-change-libdir-path.patch deleted file mode 100644 index 0f1d856..0000000 --- a/dpkg-change-libdir-path.patch +++ /dev/null @@ -1,268 +0,0 @@ -diff -ruN dpkg-1.15.5.6.orig/dselect/Makefile.in dpkg-1.15.5.6/dselect/Makefile.in ---- dpkg-1.15.5.6.orig/dselect/Makefile.in 2010-01-08 20:02:49.000000000 +0200 -+++ dpkg-1.15.5.6/dselect/Makefile.in 2010-02-14 10:11:43.052023614 +0200 -@@ -276,7 +276,7 @@ - AM_CPPFLAGS = \ - -DLOCALEDIR=\"$(localedir)\" \ - -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \ -- -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ -+ -DLOCALLIBDIR=\"/usr/local/share/dpkg\" \ - -idirafter $(top_srcdir)/lib/compat \ - -iquote $(builddir) \ - -I$(top_builddir) \ -diff -ruN dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm ---- dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm 2010-02-14 09:16:24.669895188 +0200 -@@ -57,12 +57,12 @@ - } - - sub view_mirrors { -- if (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt') { -- system('/usr/bin/pager', '/usr/lib/dpkg/methods/ftp/README.mirrors.txt'); -- } elsif (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz') { -- system('gzip -dc /usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); -+ if (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt') { -+ system('/usr/bin/pager', '/usr/share/dpkg/methods/ftp/README.mirrors.txt'); -+ } elsif (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt.gz') { -+ system('gzip -dc /usr/share/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); - } else { -- print "/usr/lib/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; -+ print "/usr/share/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; - } - } - -diff -ruN dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 2010-02-14 09:22:07.409881825 +0200 -@@ -30,8 +30,8 @@ - \fB\-L\fP\fIlibverzeichnis\fP - Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser\-Skripten - durchsucht werden soll. Diese Verzeichnis wird vor den --Standardverzeichnissen (derzeit \fB/usr/local/lib/dpkg/parsechangelog\fP und --\fB/usr/lib/dpkg/parsechangelog\fP) durchsucht. -+Standardverzeichnissen (derzeit \fB/usr/local/share/dpkg/parsechangelog\fP und -+\fB/usr/share/dpkg/parsechangelog\fP) durchsucht. - .TP - \fB\-h\fP, \fB\-\-help\fP - Zeige den Bedienungshinweis und beende. -diff -ruN dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/man/dpkg-parsechangelog.1 2010-02-14 09:17:34.013861295 +0200 -@@ -28,8 +28,8 @@ - Specify an additional directory to search for parser scripts. - This directory is searched before the default directories - which are currently --.BR /usr/local/lib/dpkg/parsechangelog " and " --.BR /usr/lib/dpkg/parsechangelog . -+.BR /usr/share/dpkg/parsechangelog " and " -+.BR /usr/local/share/dpkg/parsechangelog . - .TP - .BR \-h ", " \-\-help - Show the usage message and exit. -diff -ruN dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 2010-02-14 09:22:29.321880079 +0200 -@@ -29,8 +29,8 @@ - \fB\-L\fP\fIrep_lib\fP - Spécifie un répertoire supplémentaire pour la recherche de scripts - d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui --sont \fB/usr/local/lib/dpkg/parsechangelog\fP et --\fB/usr/lib/dpkg/parsechangelog\fP. -+sont \fB/usr/local/share/dpkg/parsechangelog\fP et -+\fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Affiche un message d'aide puis quitte. -diff -ruN dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 2010-02-14 09:21:02.338880496 +0200 -@@ -29,8 +29,8 @@ - \fB\-L\fP\fIkatalog\-lib\fP - Okre¶la dodatkowy katalog, w którym bêd± wyszukiwane skrypty - parsera. Katalog ten jest przeszukiwany przed domy¶lnymi katalogami, którymi --obecnie s± \fB/usr/local/lib/dpkg/parsechangelog\fP oraz --\fB/usr/lib/dpkg/parsechangelog\fP. -+obecnie s± \fB/usr/local/share/dpkg/parsechangelog\fP oraz -+\fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Wy¶wietla informacjê o u¿ytkowaniu i koñczy dzia³anie. -diff -ruN dpkg-1.15.5.6.orig/man/po/de.po dpkg-1.15.5.6/man/po/de.po ---- dpkg-1.15.5.6.orig/man/po/de.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/de.po 2010-02-14 09:26:20.671868793 +0200 -@@ -7747,12 +7747,12 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser-Skripten " - "durchsucht werden soll. Diese Verzeichnis wird vor den " --"Standardverzeichnissen (derzeit B und B) durchsucht." -+"Standardverzeichnissen (derzeit B und B) durchsucht." - - #. type: SS - #: dpkg-parsechangelog.1:39 -diff -ruN dpkg-1.15.5.6.orig/man/po/dpkg-man.pot dpkg-1.15.5.6/man/po/dpkg-man.pot ---- dpkg-1.15.5.6.orig/man/po/dpkg-man.pot 2010-01-08 19:23:01.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/dpkg-man.pot 2010-02-14 09:30:59.909878930 +0200 -@@ -6216,7 +6216,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently " --"B and B." -+"B and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/es.po dpkg-1.15.5.6/man/po/es.po ---- dpkg-1.15.5.6.orig/man/po/es.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/es.po 2010-02-14 09:30:16.053872999 +0200 -@@ -7517,7 +7517,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/fr.po dpkg-1.15.5.6/man/po/fr.po ---- dpkg-1.15.5.6.orig/man/po/fr.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/fr.po 2010-02-14 09:24:19.351874142 +0200 -@@ -7737,11 +7737,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Spécifie un répertoire supplémentaire pour la recherche de scripts " - "d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui " --"sont B et B et B." - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/hu.po dpkg-1.15.5.6/man/po/hu.po ---- dpkg-1.15.5.6.orig/man/po/hu.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/hu.po 2010-02-14 09:26:50.311874455 +0200 -@@ -6542,7 +6542,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/ja.po dpkg-1.15.5.6/man/po/ja.po ---- dpkg-1.15.5.6.orig/man/po/ja.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/ja.po 2010-02-14 09:28:46.064874305 +0200 -@@ -7055,7 +7055,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/pl.po dpkg-1.15.5.6/man/po/pl.po ---- dpkg-1.15.5.6.orig/man/po/pl.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/pl.po 2010-02-14 09:27:38.024873694 +0200 -@@ -7819,11 +7819,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "OkreÅ›la dodatkowy katalog, w którym bÄ™dÄ… wyszukiwane skrypty parsera. " - "Katalog ten jest przeszukiwany przed domyÅ›lnymi katalogami, którymi obecnie " --"sÄ… B oraz B oraz B." - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/pt_BR.po dpkg-1.15.5.6/man/po/pt_BR.po ---- dpkg-1.15.5.6.orig/man/po/pt_BR.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/pt_BR.po 2010-02-14 09:28:12.583874117 +0200 -@@ -6687,7 +6687,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/ru.po dpkg-1.15.5.6/man/po/ru.po ---- dpkg-1.15.5.6.orig/man/po/ru.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/ru.po 2010-02-14 09:25:17.556873843 +0200 -@@ -6823,7 +6823,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/sv.po dpkg-1.15.5.6/man/po/sv.po ---- dpkg-1.15.5.6.orig/man/po/sv.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/sv.po 2010-02-14 09:29:32.735874132 +0200 -@@ -7552,11 +7552,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks " --"genom innan standardkatalogerna, vilka för närvarande är B och B." -+"genom innan standardkatalogerna, vilka för närvarande är B och B." - - #. type: SS - #: dpkg-parsechangelog.1:39 -diff -ruN dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 2010-02-14 09:22:54.488880085 +0200 -@@ -29,7 +29,7 @@ - \fB\-L\fP\fIbibliotekskatalog\fP - Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks - genom innan standardkatalogerna, vilka för närvarande är --\fB/usr/local/lib/dpkg/parsechangelog\fP och \fB/usr/lib/dpkg/parsechangelog\fP. -+\fB/usr/local/share/dpkg/parsechangelog\fP och \fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Visar hjälpskärm och avslutar. -diff -ruN dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm ---- dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm 2010-02-14 09:14:27.550879827 +0200 -@@ -50,7 +50,7 @@ - - The parsing itself is done by an external program (searched in the - following list of directories: $opt{libdir}, --/usr/local/lib/dpkg/parsechangelog, /usr/lib/dpkg/parsechangelog) That -+/usr/local/share/dpkg/parsechangelogusr) That - program is named according to the format that it's able to parse. By - default it's either "debian" or the format name lookep up in the 40 last - lines of the changelog itself (extracted with this perl regular expression -@@ -70,9 +70,8 @@ - - sub changelog_parse { - my (%options) = @_; -- my @parserpath = ("/usr/local/lib/dpkg/parsechangelog", -- "$dpkglibdir/parsechangelog", -- "/usr/lib/dpkg/parsechangelog"); -+ my @parserpath = ( "$dpkglibdir/parsechangelog", -+ "/usr/local/share/dpkg/parsechangelog"); - my $format = "debian"; - my $changelogfile = "debian/changelog"; - my $force = 0; diff --git a/dpkg.spec b/dpkg.spec index c233462..4595c32 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,9 @@ +%global pkgconfdir %{_sysconfdir}/dpkg +%global pkgdatadir %{_datadir}/dpkg + Name: dpkg -Version: 1.15.5.6 -Release: 6%{?dist} +Version: 1.16.16 +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -11,19 +14,20 @@ Group: System Environment/Base # lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+ License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg -Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.bz2 -# obtained from dpkg-source -x dpkg_1.15.5.6.dsc -Source1: dpkg.archtable -# Fedora specific patch to store files under /usr/share/dpkg, not these are not binary -# libs. and set user search path to /usr/local/share/dpkg -Patch1: dpkg-change-libdir-path.patch -# Fixes CVE-2010-0396 bugzilla #572522 -Patch2: fedora-fix-CVE-2010-0396-00.patch -Patch3: fedora-fix-CVE-2010-0396-01.patch -Patch4: fedora-bug642160-empty-argv.patch -Patch5: fedora-fix-CVE-2010-1679_CVE-2011-0402.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel +Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz +Patch1: dpkg-fix-logrotate.patch +BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel +BuildRequires: autoconf automake gettext-devel +BuildRequires: doxygen flex xz-devel po4a +%if 0%{?rhel} != 5 && 0%{?rhel} != 6 +BuildRequires: dotconf-devel +%endif +# for /usr/bin/pod2man +%if 0%{?fedora} > 18 +BuildRequires: perl-podlators +%else +BuildRequires: perl +%endif %description @@ -40,16 +44,57 @@ dpkg and dselect will certainly be non-functional on a rpm-based system because packages dependencies will likely be unmet. %package devel +Summary: Debian package management static library +Group: Development/System +Provides: dpkg-static = %{version}-%{release} + +%description devel +This package provides the header files and static library necessary to +develop software using dpkg, the same library used internally by dpkg. + +Note though, that the API is to be considered volatile, and might change +at any time, use at your own risk. + + +%package dev Summary: Debian package development tools Group: Development/System -Requires: %{name} = %{version}-%{release} -Requires: perl, patch, make, binutils, bzip2, lzma +Requires: dpkg-perl = %{version}-%{release} +Requires: patch, make, binutils, bzip2, lzma, xz +Obsoletes: dpkg-devel < 1.16 BuildArch: noarch -%description devel +%description dev This package provides the development tools (including dpkg-source). Required to unpack, build and upload Debian source packages +%package perl +Summary: Dpkg perl modules +Group: System Environment/Base +Requires: dpkg = %{version}-%{release} +Requires: perl, perl-TimeDate +BuildArch: noarch + +%description perl +This package provides the perl modules used by the scripts +in dpkg-dev. They cover a wide range of functionalities. Among them +there are the following modules: + - Dpkg::Arch: manipulate Debian architecture information + - Dpkg::BuildOptions: parse and manipulate DEB_BUILD_OPTIONS + - Dpkg::Changelog: parse Debian changelogs + - Dpkg::Checksums: generate and parse checksums + - Dpkg::Compression::Process: wrapper around compression tools + - Dpkg::Compression::FileHandle: transparently (de)compress files + - Dpkg::Control: parse and manipulate Debian control information + (.dsc, .changes, Packages/Sources entries, etc.) + - Dpkg::Deps: parse and manipulate dependencies + - Dpkg::ErrorHandling: common error functions + - Dpkg::Index: collections of Dpkg::Control (Packages/Sources files for + example) + - Dpkg::IPC: spawn sub-processes and feed/retrieve data + - Dpkg::Substvars: substitute variables in strings + - Dpkg::Vendor: identify current distribution vendor + - Dpkg::Version: parse and manipulate Debian package versions %package -n dselect Summary: Debian package management front-end @@ -61,12 +106,7 @@ dselect is a high-level interface for the installation/removal of debs . %prep %setup -q - %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -79,79 +119,159 @@ EOF chmod +x %{__perl_requires} %build -%configure --without-start-stop-daemon \ +%if 0%{?rhel} != 5 && 0%{?rhel} != 6 +autoreconf -fiv +%endif +%configure --disable-start-stop-daemon \ --disable-linker-optimisations \ --with-admindir=%{_localstatedir}/lib/dpkg \ - --libdir=%{_datadir} \ --with-selinux \ --with-zlib \ - --with-bz2 \ - --disable-silent-rules + --with-bz2 make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -install -pm0644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable +make install DESTDIR=%{buildroot} + +mkdir -p %{buildroot}/%{pkgconfdir}/dpkg.cfg.d +mkdir -p %{buildroot}/%{pkgconfdir}/dselect.cfg.d +mkdir -p %{buildroot}/%{pkgconfdir}/origins + +# Prepare "vendor" files for dpkg-vendor +cat < %{buildroot}/%{pkgconfdir}/origins/fedora +Vendor: Fedora +Vendor-URL: http://www.fedoraproject.org/ +Bugs: https://bugzilla.redhat.com +EOF +%if 0%{?fedora} +ln -sf fedora %{buildroot}/%{pkgconfdir}/origins/default +%endif + +# from debian/dpkg.install +install -pm0644 debian/archtable %{buildroot}/%{pkgdatadir}/archtable +install -pm0644 debian/dpkg.cfg %{buildroot}/%{pkgconfdir} +install -pm0644 debian/shlibs.default %{buildroot}/%{pkgconfdir} +install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir} + +# patched debian/dpkg.logrotate +mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d +install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} + %find_lang dpkg %find_lang dpkg-dev %find_lang dselect # fedora has its own implementation -rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ +rm %{buildroot}%{_bindir}/update-alternatives +rm %{buildroot}%{_mandir}/man8/update-alternatives.8 +rm -rf %{buildroot}%{_mandir}/*/man8/update-alternatives.8 +rm -rf %{buildroot}%{_sysconfdir}/alternatives/ -%clean -rm -rf $RPM_BUILD_ROOT +#fedora has own implemenation +#FIXME should we remove this ? +rm -rf %{buildroot}%{_sbindir}/install-info + +mkdir -p %{buildroot}/var/lib/dpkg/alternatives %{buildroot}/var/lib/dpkg/info \ + %{buildroot}/var/lib/dpkg/parts %{buildroot}/var/lib/dpkg/updates \ + %{buildroot}/var/lib/dpkg/methods + + +%post +# from dpkg.postinst +# Create the database files if they don't already exist +create_database() { + admindir=${DPKG_ADMINDIR:-/var/lib/dpkg} + + for file in diversions statoverride status; do + if [ ! -f "$admindir/$file" ]; then + touch "$admindir/$file" + fi + done +} + +# Create log file and set default permissions if possible +create_logfile() { + logfile=/var/log/dpkg.log + touch $logfile + chmod 644 $logfile + chown root:root $logfile 2>/dev/null || chown 0:0 $logfile +} +create_database +create_logfile %files -f dpkg.lang %defattr(-,root,root,-) -%doc debian/changelog README AUTHORS COPYING THANKS TODO -%dir %{_sysconfdir}/dpkg +%doc debian/changelog README AUTHORS THANKS TODO +%doc debian/copyright debian/usertags +%doc doc/README.feature-removal-schedule doc/triggers.txt +%dir %{pkgconfdir} +%dir %{pkgconfdir}/dpkg.cfg.d +%dir %{pkgconfdir}/origins +%config(noreplace) %{pkgconfdir}/dpkg.cfg +%config(noreplace) %{pkgconfdir}/origins/* +%config(noreplace) %{_sysconfdir}/logrotate.d/dpkg %{_bindir}/dpkg %{_bindir}/dpkg-deb +%{_bindir}/dpkg-maintscript-helper %{_bindir}/dpkg-query %{_bindir}/dpkg-split %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride -%{_sbindir}/* -%dir %{_datadir}/dpkg -%{_datadir}/dpkg/mksplit -%{_datadir}/dpkg/archtable -%{_datadir}/dpkg/cputable -%{_datadir}/dpkg/ostable -%{_datadir}/dpkg/triplettable -%{perl_vendorlib}/Dpkg.pm -%dir %{perl_vendorlib}/Dpkg -%{perl_vendorlib}/Dpkg/Gettext.pm +%{_libdir}/dpkg/parsechangelog +%dir %{pkgdatadir} +%{pkgdatadir}/abitable +%{pkgdatadir}/archtable +%{pkgdatadir}/cputable +%{pkgdatadir}/ostable +%{pkgdatadir}/triplettable +%dir /var/lib/dpkg/alternatives +%dir /var/lib/dpkg/info +%dir /var/lib/dpkg/parts +%dir /var/lib/dpkg/updates +%{_mandir}/man1/dpkg.1.gz %{_mandir}/man1/dpkg-deb.1.gz +%{_mandir}/man1/dpkg-maintscript-helper.1.gz %{_mandir}/man1/dpkg-query.1.gz %{_mandir}/man1/dpkg-split.1.gz %{_mandir}/man1/dpkg-trigger.1.gz -%{_mandir}/man1/dpkg.1.gz %{_mandir}/man5/dpkg.cfg.5.gz %{_mandir}/man8/dpkg-divert.8.gz %{_mandir}/man8/dpkg-statoverride.8.gz -#fedora has own implemenation -%exclude %{_sbindir}/install-info -#fedora has own implemenation -%exclude %{_mandir}/man8/update-alternatives.8.gz +%{_mandir}/*/man1/dpkg.1.gz +%{_mandir}/*/man1/dpkg-deb.1.gz +%{_mandir}/*/man1/dpkg-maintscript-helper.1.gz +%{_mandir}/*/man1/dpkg-query.1.gz +%{_mandir}/*/man1/dpkg-split.1.gz +%{_mandir}/*/man1/dpkg-trigger.1.gz +%{_mandir}/*/man5/dpkg.cfg.5.gz +%{_mandir}/*/man8/dpkg-divert.8.gz +%{_mandir}/*/man8/dpkg-statoverride.8.gz + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libdpkg.a +%{_libdir}/pkgconfig/libdpkg.pc +%{_includedir}/dpkg/*.h -%files devel -f dpkg-dev.lang +%files dev %defattr(-,root,root,-) -%doc doc/README.api +%doc doc/README.api doc/coding-style.txt doc/frontend.txt +%config(noreplace) %{pkgconfdir}/shlibs.default +%config(noreplace) %{pkgconfdir}/shlibs.override %{_bindir}/dpkg-architecture %{_bindir}/dpkg-buildpackage +%{_bindir}/dpkg-buildflags %{_bindir}/dpkg-checkbuilddeps %{_bindir}/dpkg-distaddfile %{_bindir}/dpkg-genchanges %{_bindir}/dpkg-gencontrol %{_bindir}/dpkg-gensymbols +%{_bindir}/dpkg-mergechangelogs %{_bindir}/dpkg-name %{_bindir}/dpkg-parsechangelog %{_bindir}/dpkg-scanpackages @@ -159,22 +279,16 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -%dir %{_datadir}/dpkg/parsechangelog -%{_datadir}/dpkg/parsechangelog/* -%exclude %{perl_vendorlib}/Dpkg/Gettext.pm -%{perl_vendorlib}/Dpkg/*.pm -%{perl_vendorlib}/Dpkg/Changelog -%{perl_vendorlib}/Dpkg/Shlibs -%{perl_vendorlib}/Dpkg/Source -%{perl_vendorlib}/Dpkg/Vendor -%{perl_vendorlib}/Dpkg/Control +%{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz +%{_mandir}/man1/dpkg-buildflags.1.gz %{_mandir}/man1/dpkg-buildpackage.1.gz %{_mandir}/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/man1/dpkg-distaddfile.1.gz %{_mandir}/man1/dpkg-genchanges.1.gz %{_mandir}/man1/dpkg-gencontrol.1.gz %{_mandir}/man1/dpkg-gensymbols.1.gz +%{_mandir}/man1/dpkg-mergechangelogs.1.gz %{_mandir}/man1/dpkg-name.1.gz %{_mandir}/man1/dpkg-parsechangelog.1.gz %{_mandir}/man1/dpkg-scanpackages.1.gz @@ -183,28 +297,178 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/dpkg-source.1.gz %{_mandir}/man1/dpkg-vendor.1.gz %{_mandir}/man5/deb-control.5.gz +%{_mandir}/man5/deb-extra-override.5.gz %{_mandir}/man5/deb-old.5.gz +%{_mandir}/man5/deb-origin.5.gz %{_mandir}/man5/deb-override.5.gz -%{_mandir}/man5/deb-extra-override.5.gz %{_mandir}/man5/deb-shlibs.5.gz +%{_mandir}/man5/deb-split.5.gz +%{_mandir}/man5/deb-src-control.5.gz %{_mandir}/man5/deb-substvars.5.gz %{_mandir}/man5/deb-symbols.5.gz %{_mandir}/man5/deb-triggers.5.gz %{_mandir}/man5/deb-version.5.gz %{_mandir}/man5/deb.5.gz - +%{_mandir}/*/man1/dpkg-architecture.1.gz +%{_mandir}/*/man1/dpkg-buildpackage.1.gz +%{_mandir}/*/man1/dpkg-buildflags.1.gz +%{_mandir}/*/man1/dpkg-checkbuilddeps.1.gz +%{_mandir}/*/man1/dpkg-distaddfile.1.gz +%{_mandir}/*/man1/dpkg-genchanges.1.gz +%{_mandir}/*/man1/dpkg-gencontrol.1.gz +%{_mandir}/*/man1/dpkg-gensymbols.1.gz +%{_mandir}/*/man1/dpkg-mergechangelogs.1.gz +%{_mandir}/*/man1/dpkg-name.1.gz +%{_mandir}/*/man1/dpkg-parsechangelog.1.gz +%{_mandir}/*/man1/dpkg-scanpackages.1.gz +%{_mandir}/*/man1/dpkg-scansources.1.gz +%{_mandir}/*/man1/dpkg-shlibdeps.1.gz +%{_mandir}/*/man1/dpkg-source.1.gz +%{_mandir}/*/man1/dpkg-vendor.1.gz +%{_mandir}/*/man5/deb-control.5.gz +%{_mandir}/*/man5/deb-extra-override.5.gz +%{_mandir}/*/man5/deb-old.5.gz +%{_mandir}/*/man5/deb-origin.5.gz +%{_mandir}/*/man5/deb-override.5.gz +%{_mandir}/*/man5/deb-shlibs.5.gz +%{_mandir}/*/man5/deb-split.5.gz +%{_mandir}/*/man5/deb-src-control.5.gz +%{_mandir}/*/man5/deb-substvars.5.gz +%{_mandir}/*/man5/deb-symbols.5.gz +%{_mandir}/*/man5/deb-triggers.5.gz +%{_mandir}/*/man5/deb-version.5.gz +%{_mandir}/*/man5/deb.5.gz + +%files perl -f dpkg-dev.lang +%defattr(-,root,root,-) +%{perl_vendorlib}/Dpkg* +%{_mandir}/man3/Dpkg*.3* %files -n dselect -f dselect.lang %defattr(-,root,root,-) %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt %{_bindir}/dselect %{perl_vendorlib}/Debian -%{_datadir}/dpkg/methods -%{_mandir}/man*/dselect*.gz - +%{_libdir}/dpkg/methods +%{_mandir}/man1/dselect.1.gz +%{_mandir}/*/man1/dselect.1.gz +%{_mandir}/man5/dselect.cfg.5.gz +%{_mandir}/*/man5/dselect.cfg.5.gz +%dir %{pkgconfdir}/dselect.cfg.d +/var/lib/dpkg/methods %changelog +* Tue Apr 21 2015 Sérgio Basto - 1.16.16-2 +- some fixes and support for epel-6 + +* Sun Apr 19 2015 Sérgio Basto - 1.16.16-1 +- Security update to 1.16.16 + +* Sat Aug 16 2014 Fedora Release Engineering - 1.16.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Jun 23 2014 Sérgio Basto - 1.16.15-1 +- Update to 1.16.15, fixes: CVE-2014-3864, CVE-2014-3865 , rhbz #1103026 + +* Sat Jun 07 2014 Fedora Release Engineering - 1.16.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat May 10 2014 Sérgio Basto - 1.16.14-1 +- Update to 1.16.14, fixes CVE-2014-0471, rhbz #1092210 . + +* Wed Oct 16 2013 Sérgio Basto - 1.16.12-1 +- Update to 1.16.12 +- added /etc/dpkg/origins/... , by Oron Peled, rhbz #973832 +- fix few files listed twice. + +* Sat Aug 03 2013 Fedora Release Engineering - 1.16.10-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 1.16.10-7 +- Perl 5.18 rebuild + +* Mon Jul 01 2013 Sérgio Basto - 1.16.10-6 +- add support to logrotate, by Oron Peled, rhbz #979378 +- added some new %doc and debian/copyright, by Oron Peled, rhbz #979378 +- rpmlint cleanups, by Oron Peled, rhbz #979378 + +* Sun Jun 30 2013 Sérgio Basto - 1.16.10-5 +- rhbz #979378 + - Obsolete the old dpkg-devel.noarch (replaced by dpkg-dev) + (Obsoletes: dpkg-devel < 1.16) + - Readd to dpkg-perl: Requires: dpkg = - + - Patchset Signed-off-by: Oron Peled + - [PATCH 1/4] move dpkg.cfg from /etc to /etc/dpkg + - [PATCH 2/4] fix some pkgdatadir, pkgconfdir file locations + - [PATCH 3/4] move "dpkg-dev.mo" files to dpkg-perl + - [PATCH 4/4] minor fix to dpkg-perl ownerships +- move from dpkg to dpkg-dev, rhbz #979378 + - dpkg-mergechangelogs and its man-pages + - dpkg-buildflags and its man-pages +- remove man pages dups, also rhbz #979378 + dpkg-architecture.1.gz + dpkg-buildflags.1.gz + dpkg-buildpackage.1.gz + dpkg-checkbuilddeps.1.gz + dpkg-distaddfile.1.gz + dpkg-genchanges.1.gz + dpkg-gencontrol.1.gz + dpkg-gensymbols.1.gz + dpkg-mergechangelogs.1.gz + dpkg-name.1.gz + dpkg-parsechangelog.1.gz + dpkg-scanpackages.1.gz + dpkg-scansources.1.gz + dpkg-shlibdeps.1.gz + dpkg-source.1.gz + dpkg-vendor.1.gz + +* Sun Jun 02 2013 Sérgio Basto - 1.16.10-4 +- provided virtual -static package rhbz #967215 + +* Tue May 21 2013 Sérgio Basto - 1.16.10-3 +- Copied from dpkg-1.16.10/debian/dpkg.postinst, on post install, runs create_database, create_logfile. +- Based on dpkg.install and dselect.install + created some missing directories in /var/lib/dpkg and in /etc/dpkg . +- Drop Requirement dpkg of dpkg-perl. +- Fix a FIXME , all perls moved to dpkg-perl. +- TODO: set logrotates, see debian/dpkg.logrotate. + +* Fri May 17 2013 Sérgio Basto - 1.16.10-2 +- apply fix by Oron Peled bug #648384, adds dpkg-perl as noarch + +* Thu May 16 2013 Sérgio Basto - 1.16.10-1 +- Add BR perl-podlators for pod2man in F19 development or just BR perl +- Add some other importants BR: doxygen flex xz-devel po4a dotconf-devel +- Fix packages names which are debianized, so packages will be: dpkg-perl +and dpkg-dev (and dpkg-devel for headers of dpkg). +- Some clean ups. +- dpkg-perl must be arched. + +* Sat May 4 2013 Oron Peled +- Bump version to Debian/wheezy +- Call autoreconf: make sure we don't reuse Debian packaged + stuff (config.guess, etc.) +- CVE patches not needed -- is already fixed upstream +- Removed dpkg-change-libdir.patch: + - Patching Makefile.in is wrong (can patch Makefile.am with autoreconf) + - Less patch churn for non-critical paths + - Accept /usr/lib/dpkg/parsechangelog + - Accept /usr/lib/dpkg/methods + +* Wed Feb 13 2013 Fedora Release Engineering - 1.15.5.6-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1.15.5.6-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 1.15.5.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.15.5.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Wed Jan 12 2011 Andrew Colin Kissa - 1.15.5.6-6 - Fix CVE-2010-1679 - Fix CVE-2011-0402 diff --git a/fedora-bug642160-empty-argv.patch b/fedora-bug642160-empty-argv.patch deleted file mode 100644 index 86528a3..0000000 --- a/fedora-bug642160-empty-argv.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm dpkg-1.15.5.6/scripts/Dpkg/Arch.pm ---- dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm 2010-01-08 08:00:34.000000000 +0000 -+++ dpkg-1.15.5.6/scripts/Dpkg/Arch.pm 2010-10-17 12:29:46.916000478 +0100 -@@ -47,8 +47,9 @@ - return $build_arch if defined $build_arch; - - my $build_arch = `dpkg --print-architecture`; -- # FIXME: Handle bootstrapping -- syserr("dpkg --print-architecture failed") if $? >> 8; -+ if ($? >> 8 || $build_arch =~ /^\s*$/) { -+ $build_arch = get_raw_host_arch(); -+ } - - chomp $build_arch; - return $build_arch; diff --git a/fedora-fix-CVE-2010-0396-00.patch b/fedora-fix-CVE-2010-0396-00.patch deleted file mode 100644 index 6f9fc07..0000000 --- a/fedora-fix-CVE-2010-0396-00.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm ---- a/scripts/Dpkg/Source/Patch.pm -+++ b/scripts/Dpkg/Source/Patch.pm -@@ -322,8 +322,9 @@ sub analyze { - error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); - } - $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { -+ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { - $fn = $_; -+ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; - } - if (/\.dpkg-orig$/) { - error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); -@@ -336,8 +337,9 @@ sub analyze { - error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); - } - $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { -+ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { - $fn2 = $_; -+ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; - } else { - unless (defined $fn) { - error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), -@@ -363,6 +365,17 @@ sub analyze { - if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { - $dirtocreate{$dirname} = 1; - } -+ -+ # Sanity check, refuse to patch through a symlink -+ $dirname = $fn; -+ while (1) { -+ if (-l $dirname) { -+ error(_g("diff %s modifies file %s through a symlink: %s"), -+ $diff, $fn, $dirname); -+ } -+ last unless $dirname =~ s{/[^/]+$}{}; -+ } -+ - if (-e $fn and not -f _) { - error(_g("diff `%s' patches something which is not a plain file"), $diff); - } diff --git a/fedora-fix-CVE-2010-0396-01.patch b/fedora-fix-CVE-2010-0396-01.patch deleted file mode 100644 index c862e05..0000000 --- a/fedora-fix-CVE-2010-0396-01.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm ---- a/scripts/Dpkg/Source/Package/V3/quilt.pm -+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm -@@ -123,6 +123,7 @@ sub read_patch_list { - } - } - next if $opts{"skip_auto"} and $_ eq $auto_patch; -+ error(_g("%s contains an insecure path: %s"), $file, $_) if m{(^|/)\.\./}; - push @patches, $_; - } - close(SERIES); diff --git a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch deleted file mode 100644 index 26ce08d..0000000 --- a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -119,7 +119,7 @@ - # Call tar extraction process - $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ]; - $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions', -- @{$opts{"options"}}, '-xkf', '-' ]; -+ @{$opts{"options"}}, '-xf', '-' ]; - fork_and_exec(%fork_opts); - $self->cleanup_after_open(); - -@@ -142,7 +142,7 @@ - closedir(D); - my $done = 0; - erasedir($dest); -- if (scalar(@entries) == 1 && -d "$tmp/$entries[0]") { -+ if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) { - rename("$tmp/$entries[0]", $dest) || - syserr(_g("Unable to rename %s to %s"), - "$tmp/$entries[0]", $dest); -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -115,7 +115,12 @@ - # Extract main tarball - info(_g("unpacking %s"), $tarfile); - my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); -- $tar->extract($newdirectory, no_fixperms => 1); -+ $tar->extract($newdirectory, no_fixperms => 1, -+ options => [ "--anchored", "--no-wildcards-match-slash", -+ "--exclude", "*/.pc", "--exclude", ".pc" ]); -+ # The .pc exclusion is only needed for 3.0 (quilt) and to avoid -+ # having an upstream tarball provide a directory with symlinks -+ # that would be blindly followed when applying the patches - - # Extract additional orig tarballs - foreach my $subdir (keys %origtar) { -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -313,11 +313,42 @@ - $header =~ s/\s.*// unless ($header =~ s/\t.*//); - return $header; - } -+ -+ sub intuit_file_patched { -+ my ($old, $new) = @_; -+ return $new unless defined $old; -+ return $old unless defined $new; -+ return $new if -e $new and not -e $old; -+ return $old if -e $old and not -e $new; -+ # We don't consider the case where both files are non-existent and -+ # where patch picks the one with the fewest directories to create -+ # since dpkg-source will pre-create the required directories -+ # -+ # Precalculate metrics used by patch -+ my ($tmp_o, $tmp_n) = ($old, $new); -+ my ($len_o, $len_n) = (length($old), length($new)); -+ $tmp_o =~ s{[/\\]+}{/}g; -+ $tmp_n =~ s{[/\\]+}{/}g; -+ my $nb_comp_o = ($tmp_o =~ tr{/}{/}); -+ my $nb_comp_n = ($tmp_n =~ tr{/}{/}); -+ $tmp_o =~ s{^.*/}{}; -+ $tmp_n =~ s{^.*/}{}; -+ my ($blen_o, $blen_n) = (length($tmp_o), length($tmp_n)); -+ # Decide like patch would -+ if ($nb_comp_o != $nb_comp_n) { -+ return ($nb_comp_o < $nb_comp_n) ? $old : $new; -+ } elsif ($blen_o != $blen_n) { -+ return ($blen_o < $blen_n) ? $old : $new; -+ } elsif ($len_o != $len_n) { -+ return ($len_o < $len_n) ? $old : $new; -+ } -+ return $old; -+ } - $_ = getline($diff_handle); - - HUNK: - while (defined($_) || not eof($diff_handle)) { -- my ($fn, $fn2); -+ my (%path, %fn); - # skip comments leading up to patch (if any) - until (/^--- /) { - last HUNK if not defined($_ = getline($diff_handle)); -@@ -327,11 +358,8 @@ - unless(s/^--- //) { - error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); - } -- $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { -- $fn = $_; -- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; -- } -+ $path{'old'} = $_ = strip_ts($_); -+ $fn{'old'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; - if (/\.dpkg-orig$/) { - error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); - } -@@ -342,46 +370,47 @@ - unless (s/^\+\+\+ //) { - error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); - } -- $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { -- $fn2 = $_; -- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; -- } else { -- unless (defined $fn) { -- error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), -- $diff, $.); -- } -- } -+ $path{'new'} = $_ = strip_ts($_); -+ $fn{'new'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; -+ -+ unless (defined $fn{'old'} or defined $fn{'new'}) { -+ error(_g("none of the filenames in ---/+++ are valid in diff '%s' (line %d)"), -+ $diff, $.); -+ } - -- if (defined($fn) and $fn eq '/dev/null') { -+ # Safety checks on both filenames that patch could use -+ foreach my $key ("old", "new") { -+ next unless defined $fn{$key}; -+ if ($path{$key} =~ m{/\.\./}) { -+ error(_g("%s contains an insecure path: %s"), $diff, $path{$key}); -+ } -+ my $path = $fn{$key}; -+ while (1) { -+ if (-l $path) { -+ error(_g("diff %s modifies file %s through a symlink: %s"), -+ $diff, $fn{$key}, $path); -+ } -+ last unless $path =~ s{/+[^/]*$}{}; -+ last if length($path) <= length($destdir); # $destdir is assumed safe -+ } -+ } -+ -+ if ($path{'old'} eq '/dev/null' and $path{'new'} eq '/dev/null') { - error(_g("original and modified files are /dev/null in diff `%s' (line %d)"), -- $diff, $.) if (defined($fn2) and $fn2 eq '/dev/null'); -- $fn = $fn2; -- } elsif (defined($fn2) and $fn2 ne '/dev/null') { -- $fn = $fn2 unless defined $fn; -- $fn = $fn2 if ((not -e $fn) and -e $fn2); -- } elsif (defined($fn2) and $fn2 eq '/dev/null') { -+ $diff, $.); -+ } elsif ($path{'new'} eq '/dev/null') { - error(_g("file removal without proper filename in diff `%s' (line %d)"), -- $diff, $. - 1) unless defined $fn; -+ $diff, $. - 1) unless defined $fn{'old'}; - warning(_g("diff %s removes a non-existing file %s (line %d)"), -- $diff, $fn, $.) unless -e $fn; -+ $diff, $fn{'old'}, $.) unless -e $fn{'old'}; - } -+ my $fn = intuit_file_patched($fn{'old'}, $fn{'new'}); - - my $dirname = $fn; - if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { - $dirtocreate{$dirname} = 1; - } - -- # Sanity check, refuse to patch through a symlink -- $dirname = $fn; -- while (1) { -- if (-l $dirname) { -- error(_g("diff %s modifies file %s through a symlink: %s"), -- $diff, $fn, $dirname); -- } -- last unless $dirname =~ s{/[^/]+$}{}; -- } -- - if (-e $fn and not -f _) { - error(_g("diff `%s' patches something which is not a plain file"), $diff); - } diff --git a/sources b/sources index a8b1462..13ad236 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4dcb0de9af234d16a62272bcc61b8873 dpkg_1.15.5.6.tar.bz2 +88d0e4c98ecb8afe6dee896a2aa9665d dpkg_1.16.16.tar.xz From 664a815e8e3f06fb3e3979c2fd0f9cb2e408216a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 Apr 2015 04:59:43 +0100 Subject: [PATCH 051/102] real merge 2 --- dpkg-fix-logrotate.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 dpkg-fix-logrotate.patch diff --git a/dpkg-fix-logrotate.patch b/dpkg-fix-logrotate.patch new file mode 100644 index 0000000..4a14ad6 --- /dev/null +++ b/dpkg-fix-logrotate.patch @@ -0,0 +1,16 @@ +diff -up ./debian/dpkg.logrotate.orig ./debian/dpkg.logrotate +--- ./debian/dpkg.logrotate.orig 2013-06-30 10:04:23.369382622 +0300 ++++ ./debian/dpkg.logrotate 2013-06-30 10:04:39.268407865 +0300 +@@ -7,12 +7,3 @@ + notifempty + create 644 root root + } +-/var/log/alternatives.log { +- monthly +- rotate 12 +- compress +- delaycompress +- missingok +- notifempty +- create 644 root root +-} From 628b738ea04c2e0d22bfff24d078fbbad66d735f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 Apr 2015 05:22:21 +0100 Subject: [PATCH 052/102] merge master --- .gitignore | 5 + dpkg-change-libdir-path.patch | 268 ------------- dpkg-fix-logrotate.patch | 16 + dpkg.spec | 399 +++++++++++++++---- fedora-bug642160-empty-argv.patch | 15 - fedora-fix-CVE-2010-0396-00.patch | 43 -- fedora-fix-CVE-2010-0396-01.patch | 11 - fedora-fix-CVE-2010-1679_CVE-2011-0402.patch | 176 -------- sources | 2 +- 9 files changed, 354 insertions(+), 581 deletions(-) delete mode 100644 dpkg-change-libdir-path.patch create mode 100644 dpkg-fix-logrotate.patch delete mode 100644 fedora-bug642160-empty-argv.patch delete mode 100644 fedora-fix-CVE-2010-0396-00.patch delete mode 100644 fedora-fix-CVE-2010-0396-01.patch delete mode 100644 fedora-fix-CVE-2010-1679_CVE-2011-0402.patch diff --git a/.gitignore b/.gitignore index 0d52732..46d6960 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.15.5.6.tar.bz2 +/dpkg_1.16.10.tar.xz +/dpkg_1.16.12.tar.xz +/dpkg_1.16.14.tar.xz +/dpkg_1.16.15.tar.xz +/dpkg_1.16.16.tar.xz diff --git a/dpkg-change-libdir-path.patch b/dpkg-change-libdir-path.patch deleted file mode 100644 index 0f1d856..0000000 --- a/dpkg-change-libdir-path.patch +++ /dev/null @@ -1,268 +0,0 @@ -diff -ruN dpkg-1.15.5.6.orig/dselect/Makefile.in dpkg-1.15.5.6/dselect/Makefile.in ---- dpkg-1.15.5.6.orig/dselect/Makefile.in 2010-01-08 20:02:49.000000000 +0200 -+++ dpkg-1.15.5.6/dselect/Makefile.in 2010-02-14 10:11:43.052023614 +0200 -@@ -276,7 +276,7 @@ - AM_CPPFLAGS = \ - -DLOCALEDIR=\"$(localedir)\" \ - -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \ -- -DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \ -+ -DLOCALLIBDIR=\"/usr/local/share/dpkg\" \ - -idirafter $(top_srcdir)/lib/compat \ - -iquote $(builddir) \ - -I$(top_builddir) \ -diff -ruN dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm ---- dpkg-1.15.5.6.orig/dselect/methods/Debian/Dselect/Ftp.pm 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/dselect/methods/Debian/Dselect/Ftp.pm 2010-02-14 09:16:24.669895188 +0200 -@@ -57,12 +57,12 @@ - } - - sub view_mirrors { -- if (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt') { -- system('/usr/bin/pager', '/usr/lib/dpkg/methods/ftp/README.mirrors.txt'); -- } elsif (-f '/usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz') { -- system('gzip -dc /usr/lib/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); -+ if (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt') { -+ system('/usr/bin/pager', '/usr/share/dpkg/methods/ftp/README.mirrors.txt'); -+ } elsif (-f '/usr/share/dpkg/methods/ftp/README.mirrors.txt.gz') { -+ system('gzip -dc /usr/share/dpkg/methods/ftp/README.mirrors.txt.gz | pager'); - } else { -- print "/usr/lib/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; -+ print "/usr/share/dpkg/methods/ftp/README.mirrors.txt(.gz): file not found.\n"; - } - } - -diff -ruN dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/de/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/de/dpkg-parsechangelog.1 2010-02-14 09:22:07.409881825 +0200 -@@ -30,8 +30,8 @@ - \fB\-L\fP\fIlibverzeichnis\fP - Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser\-Skripten - durchsucht werden soll. Diese Verzeichnis wird vor den --Standardverzeichnissen (derzeit \fB/usr/local/lib/dpkg/parsechangelog\fP und --\fB/usr/lib/dpkg/parsechangelog\fP) durchsucht. -+Standardverzeichnissen (derzeit \fB/usr/local/share/dpkg/parsechangelog\fP und -+\fB/usr/share/dpkg/parsechangelog\fP) durchsucht. - .TP - \fB\-h\fP, \fB\-\-help\fP - Zeige den Bedienungshinweis und beende. -diff -ruN dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/dpkg-parsechangelog.1 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/man/dpkg-parsechangelog.1 2010-02-14 09:17:34.013861295 +0200 -@@ -28,8 +28,8 @@ - Specify an additional directory to search for parser scripts. - This directory is searched before the default directories - which are currently --.BR /usr/local/lib/dpkg/parsechangelog " and " --.BR /usr/lib/dpkg/parsechangelog . -+.BR /usr/share/dpkg/parsechangelog " and " -+.BR /usr/local/share/dpkg/parsechangelog . - .TP - .BR \-h ", " \-\-help - Show the usage message and exit. -diff -ruN dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/fr/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/fr/dpkg-parsechangelog.1 2010-02-14 09:22:29.321880079 +0200 -@@ -29,8 +29,8 @@ - \fB\-L\fP\fIrep_lib\fP - Spécifie un répertoire supplémentaire pour la recherche de scripts - d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui --sont \fB/usr/local/lib/dpkg/parsechangelog\fP et --\fB/usr/lib/dpkg/parsechangelog\fP. -+sont \fB/usr/local/share/dpkg/parsechangelog\fP et -+\fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Affiche un message d'aide puis quitte. -diff -ruN dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/pl/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/pl/dpkg-parsechangelog.1 2010-02-14 09:21:02.338880496 +0200 -@@ -29,8 +29,8 @@ - \fB\-L\fP\fIkatalog\-lib\fP - Okre¶la dodatkowy katalog, w którym bêd± wyszukiwane skrypty - parsera. Katalog ten jest przeszukiwany przed domy¶lnymi katalogami, którymi --obecnie s± \fB/usr/local/lib/dpkg/parsechangelog\fP oraz --\fB/usr/lib/dpkg/parsechangelog\fP. -+obecnie s± \fB/usr/local/share/dpkg/parsechangelog\fP oraz -+\fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Wy¶wietla informacjê o u¿ytkowaniu i koñczy dzia³anie. -diff -ruN dpkg-1.15.5.6.orig/man/po/de.po dpkg-1.15.5.6/man/po/de.po ---- dpkg-1.15.5.6.orig/man/po/de.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/de.po 2010-02-14 09:26:20.671868793 +0200 -@@ -7747,12 +7747,12 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Spezifiziere ein zusätzliches Verzeichnis, dass nach Parser-Skripten " - "durchsucht werden soll. Diese Verzeichnis wird vor den " --"Standardverzeichnissen (derzeit B und B) durchsucht." -+"Standardverzeichnissen (derzeit B und B) durchsucht." - - #. type: SS - #: dpkg-parsechangelog.1:39 -diff -ruN dpkg-1.15.5.6.orig/man/po/dpkg-man.pot dpkg-1.15.5.6/man/po/dpkg-man.pot ---- dpkg-1.15.5.6.orig/man/po/dpkg-man.pot 2010-01-08 19:23:01.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/dpkg-man.pot 2010-02-14 09:30:59.909878930 +0200 -@@ -6216,7 +6216,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently " --"B and B." -+"B and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/es.po dpkg-1.15.5.6/man/po/es.po ---- dpkg-1.15.5.6.orig/man/po/es.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/es.po 2010-02-14 09:30:16.053872999 +0200 -@@ -7517,7 +7517,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/fr.po dpkg-1.15.5.6/man/po/fr.po ---- dpkg-1.15.5.6.orig/man/po/fr.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/fr.po 2010-02-14 09:24:19.351874142 +0200 -@@ -7737,11 +7737,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Spécifie un répertoire supplémentaire pour la recherche de scripts " - "d'analyse. Ce répertoire est examiné avant les répertoires par défaut qui " --"sont B et B et B." - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/hu.po dpkg-1.15.5.6/man/po/hu.po ---- dpkg-1.15.5.6.orig/man/po/hu.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/hu.po 2010-02-14 09:26:50.311874455 +0200 -@@ -6542,7 +6542,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/ja.po dpkg-1.15.5.6/man/po/ja.po ---- dpkg-1.15.5.6.orig/man/po/ja.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/ja.po 2010-02-14 09:28:46.064874305 +0200 -@@ -7055,7 +7055,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/pl.po dpkg-1.15.5.6/man/po/pl.po ---- dpkg-1.15.5.6.orig/man/po/pl.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/pl.po 2010-02-14 09:27:38.024873694 +0200 -@@ -7819,11 +7819,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "OkreÅ›la dodatkowy katalog, w którym bÄ™dÄ… wyszukiwane skrypty parsera. " - "Katalog ten jest przeszukiwany przed domyÅ›lnymi katalogami, którymi obecnie " --"sÄ… B oraz B oraz B." - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/pt_BR.po dpkg-1.15.5.6/man/po/pt_BR.po ---- dpkg-1.15.5.6.orig/man/po/pt_BR.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/pt_BR.po 2010-02-14 09:28:12.583874117 +0200 -@@ -6687,7 +6687,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/ru.po dpkg-1.15.5.6/man/po/ru.po ---- dpkg-1.15.5.6.orig/man/po/ru.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/ru.po 2010-02-14 09:25:17.556873843 +0200 -@@ -6823,7 +6823,7 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - - #. type: SS -diff -ruN dpkg-1.15.5.6.orig/man/po/sv.po dpkg-1.15.5.6/man/po/sv.po ---- dpkg-1.15.5.6.orig/man/po/sv.po 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/po/sv.po 2010-02-14 09:29:32.735874132 +0200 -@@ -7552,11 +7552,11 @@ - msgid "" - "Specify an additional directory to search for parser scripts. This " - "directory is searched before the default directories which are currently B and B." -+"usr/local/share/dpkg/parsechangelog> and B." - msgstr "" - "Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks " --"genom innan standardkatalogerna, vilka för närvarande är B och B." -+"genom innan standardkatalogerna, vilka för närvarande är B och B." - - #. type: SS - #: dpkg-parsechangelog.1:39 -diff -ruN dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 ---- dpkg-1.15.5.6.orig/man/sv/dpkg-parsechangelog.1 2010-01-08 20:05:23.000000000 +0200 -+++ dpkg-1.15.5.6/man/sv/dpkg-parsechangelog.1 2010-02-14 09:22:54.488880085 +0200 -@@ -29,7 +29,7 @@ - \fB\-L\fP\fIbibliotekskatalog\fP - Ange en ytterligare katalog att söka i efter parserskript. Katalogen söks - genom innan standardkatalogerna, vilka för närvarande är --\fB/usr/local/lib/dpkg/parsechangelog\fP och \fB/usr/lib/dpkg/parsechangelog\fP. -+\fB/usr/local/share/dpkg/parsechangelog\fP och \fB/usr/share/dpkg/parsechangelog\fP. - .TP - \fB\-h\fP, \fB\-\-help\fP - Visar hjälpskärm och avslutar. -diff -ruN dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm ---- dpkg-1.15.5.6.orig/scripts/Dpkg/Changelog/Parse.pm 2010-01-08 10:00:34.000000000 +0200 -+++ dpkg-1.15.5.6/scripts/Dpkg/Changelog/Parse.pm 2010-02-14 09:14:27.550879827 +0200 -@@ -50,7 +50,7 @@ - - The parsing itself is done by an external program (searched in the - following list of directories: $opt{libdir}, --/usr/local/lib/dpkg/parsechangelog, /usr/lib/dpkg/parsechangelog) That -+/usr/local/share/dpkg/parsechangelogusr) That - program is named according to the format that it's able to parse. By - default it's either "debian" or the format name lookep up in the 40 last - lines of the changelog itself (extracted with this perl regular expression -@@ -70,9 +70,8 @@ - - sub changelog_parse { - my (%options) = @_; -- my @parserpath = ("/usr/local/lib/dpkg/parsechangelog", -- "$dpkglibdir/parsechangelog", -- "/usr/lib/dpkg/parsechangelog"); -+ my @parserpath = ( "$dpkglibdir/parsechangelog", -+ "/usr/local/share/dpkg/parsechangelog"); - my $format = "debian"; - my $changelogfile = "debian/changelog"; - my $force = 0; diff --git a/dpkg-fix-logrotate.patch b/dpkg-fix-logrotate.patch new file mode 100644 index 0000000..4a14ad6 --- /dev/null +++ b/dpkg-fix-logrotate.patch @@ -0,0 +1,16 @@ +diff -up ./debian/dpkg.logrotate.orig ./debian/dpkg.logrotate +--- ./debian/dpkg.logrotate.orig 2013-06-30 10:04:23.369382622 +0300 ++++ ./debian/dpkg.logrotate 2013-06-30 10:04:39.268407865 +0300 +@@ -7,12 +7,3 @@ + notifempty + create 644 root root + } +-/var/log/alternatives.log { +- monthly +- rotate 12 +- compress +- delaycompress +- missingok +- notifempty +- create 644 root root +-} diff --git a/dpkg.spec b/dpkg.spec index 35835b2..4595c32 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,6 +1,9 @@ +%global pkgconfdir %{_sysconfdir}/dpkg +%global pkgdatadir %{_datadir}/dpkg + Name: dpkg -Version: 1.15.5.6 -Release: 6%{?dist} +Version: 1.16.16 +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -11,19 +14,20 @@ Group: System Environment/Base # lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+ License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: http://packages.debian.org/unstable/admin/dpkg -Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.bz2 -# obtained from dpkg-source -x dpkg_1.15.5.6.dsc -Source1: dpkg.archtable -# Fedora specific patch to store files under /usr/share/dpkg, not these are not binary -# libs. and set user search path to /usr/local/share/dpkg -Patch1: dpkg-change-libdir-path.patch -# Fixes CVE-2010-0396 bugzilla #572522 -Patch2: fedora-fix-CVE-2010-0396-00.patch -Patch3: fedora-fix-CVE-2010-0396-01.patch -Patch4: fedora-bug642160-empty-argv.patch -Patch5: fedora-fix-CVE-2010-1679_CVE-2011-0402.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: zlib-devel, bzip2-devel, libselinux-devel, gettext, ncurses-devel +Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz +Patch1: dpkg-fix-logrotate.patch +BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel +BuildRequires: autoconf automake gettext-devel +BuildRequires: doxygen flex xz-devel po4a +%if 0%{?rhel} != 5 && 0%{?rhel} != 6 +BuildRequires: dotconf-devel +%endif +# for /usr/bin/pod2man +%if 0%{?fedora} > 18 +BuildRequires: perl-podlators +%else +BuildRequires: perl +%endif %description @@ -40,15 +44,57 @@ dpkg and dselect will certainly be non-functional on a rpm-based system because packages dependencies will likely be unmet. %package devel -Summary: Debian package development tools +Summary: Debian package management static library Group: Development/System -Requires: %{name} = %{version}-%{release} -Requires: perl, patch, make, binutils, bzip2, lzma +Provides: dpkg-static = %{version}-%{release} %description devel +This package provides the header files and static library necessary to +develop software using dpkg, the same library used internally by dpkg. + +Note though, that the API is to be considered volatile, and might change +at any time, use at your own risk. + + +%package dev +Summary: Debian package development tools +Group: Development/System +Requires: dpkg-perl = %{version}-%{release} +Requires: patch, make, binutils, bzip2, lzma, xz +Obsoletes: dpkg-devel < 1.16 +BuildArch: noarch + +%description dev This package provides the development tools (including dpkg-source). Required to unpack, build and upload Debian source packages +%package perl +Summary: Dpkg perl modules +Group: System Environment/Base +Requires: dpkg = %{version}-%{release} +Requires: perl, perl-TimeDate +BuildArch: noarch + +%description perl +This package provides the perl modules used by the scripts +in dpkg-dev. They cover a wide range of functionalities. Among them +there are the following modules: + - Dpkg::Arch: manipulate Debian architecture information + - Dpkg::BuildOptions: parse and manipulate DEB_BUILD_OPTIONS + - Dpkg::Changelog: parse Debian changelogs + - Dpkg::Checksums: generate and parse checksums + - Dpkg::Compression::Process: wrapper around compression tools + - Dpkg::Compression::FileHandle: transparently (de)compress files + - Dpkg::Control: parse and manipulate Debian control information + (.dsc, .changes, Packages/Sources entries, etc.) + - Dpkg::Deps: parse and manipulate dependencies + - Dpkg::ErrorHandling: common error functions + - Dpkg::Index: collections of Dpkg::Control (Packages/Sources files for + example) + - Dpkg::IPC: spawn sub-processes and feed/retrieve data + - Dpkg::Substvars: substitute variables in strings + - Dpkg::Vendor: identify current distribution vendor + - Dpkg::Version: parse and manipulate Debian package versions %package -n dselect Summary: Debian package management front-end @@ -60,12 +106,7 @@ dselect is a high-level interface for the installation/removal of debs . %prep %setup -q - %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -78,79 +119,159 @@ EOF chmod +x %{__perl_requires} %build -%configure --without-start-stop-daemon \ +%if 0%{?rhel} != 5 && 0%{?rhel} != 6 +autoreconf -fiv +%endif +%configure --disable-start-stop-daemon \ --disable-linker-optimisations \ --with-admindir=%{_localstatedir}/lib/dpkg \ - --libdir=%{_datadir} \ --with-selinux \ --with-zlib \ - --with-bz2 \ - --disable-silent-rules + --with-bz2 make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -install -pm0644 %SOURCE1 $RPM_BUILD_ROOT/%{_datadir}/dpkg/archtable +make install DESTDIR=%{buildroot} + +mkdir -p %{buildroot}/%{pkgconfdir}/dpkg.cfg.d +mkdir -p %{buildroot}/%{pkgconfdir}/dselect.cfg.d +mkdir -p %{buildroot}/%{pkgconfdir}/origins + +# Prepare "vendor" files for dpkg-vendor +cat < %{buildroot}/%{pkgconfdir}/origins/fedora +Vendor: Fedora +Vendor-URL: http://www.fedoraproject.org/ +Bugs: https://bugzilla.redhat.com +EOF +%if 0%{?fedora} +ln -sf fedora %{buildroot}/%{pkgconfdir}/origins/default +%endif + +# from debian/dpkg.install +install -pm0644 debian/archtable %{buildroot}/%{pkgdatadir}/archtable +install -pm0644 debian/dpkg.cfg %{buildroot}/%{pkgconfdir} +install -pm0644 debian/shlibs.default %{buildroot}/%{pkgconfdir} +install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir} + +# patched debian/dpkg.logrotate +mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d +install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} + %find_lang dpkg %find_lang dpkg-dev %find_lang dselect # fedora has its own implementation -rm -rf $RPM_BUILD_ROOT%{_bindir}/update-alternatives -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/alternatives/ +rm %{buildroot}%{_bindir}/update-alternatives +rm %{buildroot}%{_mandir}/man8/update-alternatives.8 +rm -rf %{buildroot}%{_mandir}/*/man8/update-alternatives.8 +rm -rf %{buildroot}%{_sysconfdir}/alternatives/ -%clean -rm -rf $RPM_BUILD_ROOT +#fedora has own implemenation +#FIXME should we remove this ? +rm -rf %{buildroot}%{_sbindir}/install-info + +mkdir -p %{buildroot}/var/lib/dpkg/alternatives %{buildroot}/var/lib/dpkg/info \ + %{buildroot}/var/lib/dpkg/parts %{buildroot}/var/lib/dpkg/updates \ + %{buildroot}/var/lib/dpkg/methods + + +%post +# from dpkg.postinst +# Create the database files if they don't already exist +create_database() { + admindir=${DPKG_ADMINDIR:-/var/lib/dpkg} + + for file in diversions statoverride status; do + if [ ! -f "$admindir/$file" ]; then + touch "$admindir/$file" + fi + done +} + +# Create log file and set default permissions if possible +create_logfile() { + logfile=/var/log/dpkg.log + touch $logfile + chmod 644 $logfile + chown root:root $logfile 2>/dev/null || chown 0:0 $logfile +} +create_database +create_logfile %files -f dpkg.lang %defattr(-,root,root,-) -%doc debian/changelog README AUTHORS COPYING THANKS TODO -%dir %{_sysconfdir}/dpkg +%doc debian/changelog README AUTHORS THANKS TODO +%doc debian/copyright debian/usertags +%doc doc/README.feature-removal-schedule doc/triggers.txt +%dir %{pkgconfdir} +%dir %{pkgconfdir}/dpkg.cfg.d +%dir %{pkgconfdir}/origins +%config(noreplace) %{pkgconfdir}/dpkg.cfg +%config(noreplace) %{pkgconfdir}/origins/* +%config(noreplace) %{_sysconfdir}/logrotate.d/dpkg %{_bindir}/dpkg %{_bindir}/dpkg-deb +%{_bindir}/dpkg-maintscript-helper %{_bindir}/dpkg-query %{_bindir}/dpkg-split %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride -%{_sbindir}/* -%dir %{_datadir}/dpkg -%{_datadir}/dpkg/mksplit -%{_datadir}/dpkg/archtable -%{_datadir}/dpkg/cputable -%{_datadir}/dpkg/ostable -%{_datadir}/dpkg/triplettable -%{perl_vendorlib}/Dpkg.pm -%dir %{perl_vendorlib}/Dpkg -%{perl_vendorlib}/Dpkg/Gettext.pm +%{_libdir}/dpkg/parsechangelog +%dir %{pkgdatadir} +%{pkgdatadir}/abitable +%{pkgdatadir}/archtable +%{pkgdatadir}/cputable +%{pkgdatadir}/ostable +%{pkgdatadir}/triplettable +%dir /var/lib/dpkg/alternatives +%dir /var/lib/dpkg/info +%dir /var/lib/dpkg/parts +%dir /var/lib/dpkg/updates +%{_mandir}/man1/dpkg.1.gz %{_mandir}/man1/dpkg-deb.1.gz +%{_mandir}/man1/dpkg-maintscript-helper.1.gz %{_mandir}/man1/dpkg-query.1.gz %{_mandir}/man1/dpkg-split.1.gz %{_mandir}/man1/dpkg-trigger.1.gz -%{_mandir}/man1/dpkg.1.gz %{_mandir}/man5/dpkg.cfg.5.gz %{_mandir}/man8/dpkg-divert.8.gz %{_mandir}/man8/dpkg-statoverride.8.gz -#fedora has own implemenation -%exclude %{_sbindir}/install-info -#fedora has own implemenation -%exclude %{_mandir}/man8/update-alternatives.8.gz +%{_mandir}/*/man1/dpkg.1.gz +%{_mandir}/*/man1/dpkg-deb.1.gz +%{_mandir}/*/man1/dpkg-maintscript-helper.1.gz +%{_mandir}/*/man1/dpkg-query.1.gz +%{_mandir}/*/man1/dpkg-split.1.gz +%{_mandir}/*/man1/dpkg-trigger.1.gz +%{_mandir}/*/man5/dpkg.cfg.5.gz +%{_mandir}/*/man8/dpkg-divert.8.gz +%{_mandir}/*/man8/dpkg-statoverride.8.gz + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libdpkg.a +%{_libdir}/pkgconfig/libdpkg.pc +%{_includedir}/dpkg/*.h -%files devel -f dpkg-dev.lang +%files dev %defattr(-,root,root,-) -%doc doc/README.api +%doc doc/README.api doc/coding-style.txt doc/frontend.txt +%config(noreplace) %{pkgconfdir}/shlibs.default +%config(noreplace) %{pkgconfdir}/shlibs.override %{_bindir}/dpkg-architecture %{_bindir}/dpkg-buildpackage +%{_bindir}/dpkg-buildflags %{_bindir}/dpkg-checkbuilddeps %{_bindir}/dpkg-distaddfile %{_bindir}/dpkg-genchanges %{_bindir}/dpkg-gencontrol %{_bindir}/dpkg-gensymbols +%{_bindir}/dpkg-mergechangelogs %{_bindir}/dpkg-name %{_bindir}/dpkg-parsechangelog %{_bindir}/dpkg-scanpackages @@ -158,22 +279,16 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -%dir %{_datadir}/dpkg/parsechangelog -%{_datadir}/dpkg/parsechangelog/* -%exclude %{perl_vendorlib}/Dpkg/Gettext.pm -%{perl_vendorlib}/Dpkg/*.pm -%{perl_vendorlib}/Dpkg/Changelog -%{perl_vendorlib}/Dpkg/Shlibs -%{perl_vendorlib}/Dpkg/Source -%{perl_vendorlib}/Dpkg/Vendor -%{perl_vendorlib}/Dpkg/Control +%{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz +%{_mandir}/man1/dpkg-buildflags.1.gz %{_mandir}/man1/dpkg-buildpackage.1.gz %{_mandir}/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/man1/dpkg-distaddfile.1.gz %{_mandir}/man1/dpkg-genchanges.1.gz %{_mandir}/man1/dpkg-gencontrol.1.gz %{_mandir}/man1/dpkg-gensymbols.1.gz +%{_mandir}/man1/dpkg-mergechangelogs.1.gz %{_mandir}/man1/dpkg-name.1.gz %{_mandir}/man1/dpkg-parsechangelog.1.gz %{_mandir}/man1/dpkg-scanpackages.1.gz @@ -182,28 +297,178 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/dpkg-source.1.gz %{_mandir}/man1/dpkg-vendor.1.gz %{_mandir}/man5/deb-control.5.gz +%{_mandir}/man5/deb-extra-override.5.gz %{_mandir}/man5/deb-old.5.gz +%{_mandir}/man5/deb-origin.5.gz %{_mandir}/man5/deb-override.5.gz -%{_mandir}/man5/deb-extra-override.5.gz %{_mandir}/man5/deb-shlibs.5.gz +%{_mandir}/man5/deb-split.5.gz +%{_mandir}/man5/deb-src-control.5.gz %{_mandir}/man5/deb-substvars.5.gz %{_mandir}/man5/deb-symbols.5.gz %{_mandir}/man5/deb-triggers.5.gz %{_mandir}/man5/deb-version.5.gz %{_mandir}/man5/deb.5.gz - +%{_mandir}/*/man1/dpkg-architecture.1.gz +%{_mandir}/*/man1/dpkg-buildpackage.1.gz +%{_mandir}/*/man1/dpkg-buildflags.1.gz +%{_mandir}/*/man1/dpkg-checkbuilddeps.1.gz +%{_mandir}/*/man1/dpkg-distaddfile.1.gz +%{_mandir}/*/man1/dpkg-genchanges.1.gz +%{_mandir}/*/man1/dpkg-gencontrol.1.gz +%{_mandir}/*/man1/dpkg-gensymbols.1.gz +%{_mandir}/*/man1/dpkg-mergechangelogs.1.gz +%{_mandir}/*/man1/dpkg-name.1.gz +%{_mandir}/*/man1/dpkg-parsechangelog.1.gz +%{_mandir}/*/man1/dpkg-scanpackages.1.gz +%{_mandir}/*/man1/dpkg-scansources.1.gz +%{_mandir}/*/man1/dpkg-shlibdeps.1.gz +%{_mandir}/*/man1/dpkg-source.1.gz +%{_mandir}/*/man1/dpkg-vendor.1.gz +%{_mandir}/*/man5/deb-control.5.gz +%{_mandir}/*/man5/deb-extra-override.5.gz +%{_mandir}/*/man5/deb-old.5.gz +%{_mandir}/*/man5/deb-origin.5.gz +%{_mandir}/*/man5/deb-override.5.gz +%{_mandir}/*/man5/deb-shlibs.5.gz +%{_mandir}/*/man5/deb-split.5.gz +%{_mandir}/*/man5/deb-src-control.5.gz +%{_mandir}/*/man5/deb-substvars.5.gz +%{_mandir}/*/man5/deb-symbols.5.gz +%{_mandir}/*/man5/deb-triggers.5.gz +%{_mandir}/*/man5/deb-version.5.gz +%{_mandir}/*/man5/deb.5.gz + +%files perl -f dpkg-dev.lang +%defattr(-,root,root,-) +%{perl_vendorlib}/Dpkg* +%{_mandir}/man3/Dpkg*.3* %files -n dselect -f dselect.lang %defattr(-,root,root,-) %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt %{_bindir}/dselect %{perl_vendorlib}/Debian -%{_datadir}/dpkg/methods -%{_mandir}/man*/dselect*.gz - +%{_libdir}/dpkg/methods +%{_mandir}/man1/dselect.1.gz +%{_mandir}/*/man1/dselect.1.gz +%{_mandir}/man5/dselect.cfg.5.gz +%{_mandir}/*/man5/dselect.cfg.5.gz +%dir %{pkgconfdir}/dselect.cfg.d +/var/lib/dpkg/methods %changelog +* Tue Apr 21 2015 Sérgio Basto - 1.16.16-2 +- some fixes and support for epel-6 + +* Sun Apr 19 2015 Sérgio Basto - 1.16.16-1 +- Security update to 1.16.16 + +* Sat Aug 16 2014 Fedora Release Engineering - 1.16.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Jun 23 2014 Sérgio Basto - 1.16.15-1 +- Update to 1.16.15, fixes: CVE-2014-3864, CVE-2014-3865 , rhbz #1103026 + +* Sat Jun 07 2014 Fedora Release Engineering - 1.16.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat May 10 2014 Sérgio Basto - 1.16.14-1 +- Update to 1.16.14, fixes CVE-2014-0471, rhbz #1092210 . + +* Wed Oct 16 2013 Sérgio Basto - 1.16.12-1 +- Update to 1.16.12 +- added /etc/dpkg/origins/... , by Oron Peled, rhbz #973832 +- fix few files listed twice. + +* Sat Aug 03 2013 Fedora Release Engineering - 1.16.10-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 1.16.10-7 +- Perl 5.18 rebuild + +* Mon Jul 01 2013 Sérgio Basto - 1.16.10-6 +- add support to logrotate, by Oron Peled, rhbz #979378 +- added some new %doc and debian/copyright, by Oron Peled, rhbz #979378 +- rpmlint cleanups, by Oron Peled, rhbz #979378 + +* Sun Jun 30 2013 Sérgio Basto - 1.16.10-5 +- rhbz #979378 + - Obsolete the old dpkg-devel.noarch (replaced by dpkg-dev) + (Obsoletes: dpkg-devel < 1.16) + - Readd to dpkg-perl: Requires: dpkg = - + - Patchset Signed-off-by: Oron Peled + - [PATCH 1/4] move dpkg.cfg from /etc to /etc/dpkg + - [PATCH 2/4] fix some pkgdatadir, pkgconfdir file locations + - [PATCH 3/4] move "dpkg-dev.mo" files to dpkg-perl + - [PATCH 4/4] minor fix to dpkg-perl ownerships +- move from dpkg to dpkg-dev, rhbz #979378 + - dpkg-mergechangelogs and its man-pages + - dpkg-buildflags and its man-pages +- remove man pages dups, also rhbz #979378 + dpkg-architecture.1.gz + dpkg-buildflags.1.gz + dpkg-buildpackage.1.gz + dpkg-checkbuilddeps.1.gz + dpkg-distaddfile.1.gz + dpkg-genchanges.1.gz + dpkg-gencontrol.1.gz + dpkg-gensymbols.1.gz + dpkg-mergechangelogs.1.gz + dpkg-name.1.gz + dpkg-parsechangelog.1.gz + dpkg-scanpackages.1.gz + dpkg-scansources.1.gz + dpkg-shlibdeps.1.gz + dpkg-source.1.gz + dpkg-vendor.1.gz + +* Sun Jun 02 2013 Sérgio Basto - 1.16.10-4 +- provided virtual -static package rhbz #967215 + +* Tue May 21 2013 Sérgio Basto - 1.16.10-3 +- Copied from dpkg-1.16.10/debian/dpkg.postinst, on post install, runs create_database, create_logfile. +- Based on dpkg.install and dselect.install + created some missing directories in /var/lib/dpkg and in /etc/dpkg . +- Drop Requirement dpkg of dpkg-perl. +- Fix a FIXME , all perls moved to dpkg-perl. +- TODO: set logrotates, see debian/dpkg.logrotate. + +* Fri May 17 2013 Sérgio Basto - 1.16.10-2 +- apply fix by Oron Peled bug #648384, adds dpkg-perl as noarch + +* Thu May 16 2013 Sérgio Basto - 1.16.10-1 +- Add BR perl-podlators for pod2man in F19 development or just BR perl +- Add some other importants BR: doxygen flex xz-devel po4a dotconf-devel +- Fix packages names which are debianized, so packages will be: dpkg-perl +and dpkg-dev (and dpkg-devel for headers of dpkg). +- Some clean ups. +- dpkg-perl must be arched. + +* Sat May 4 2013 Oron Peled +- Bump version to Debian/wheezy +- Call autoreconf: make sure we don't reuse Debian packaged + stuff (config.guess, etc.) +- CVE patches not needed -- is already fixed upstream +- Removed dpkg-change-libdir.patch: + - Patching Makefile.in is wrong (can patch Makefile.am with autoreconf) + - Less patch churn for non-critical paths + - Accept /usr/lib/dpkg/parsechangelog + - Accept /usr/lib/dpkg/methods + +* Wed Feb 13 2013 Fedora Release Engineering - 1.15.5.6-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1.15.5.6-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 1.15.5.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.15.5.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Wed Jan 12 2011 Andrew Colin Kissa - 1.15.5.6-6 - Fix CVE-2010-1679 - Fix CVE-2011-0402 diff --git a/fedora-bug642160-empty-argv.patch b/fedora-bug642160-empty-argv.patch deleted file mode 100644 index 86528a3..0000000 --- a/fedora-bug642160-empty-argv.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm dpkg-1.15.5.6/scripts/Dpkg/Arch.pm ---- dpkg-1.15.5.6.orig/scripts/Dpkg/Arch.pm 2010-01-08 08:00:34.000000000 +0000 -+++ dpkg-1.15.5.6/scripts/Dpkg/Arch.pm 2010-10-17 12:29:46.916000478 +0100 -@@ -47,8 +47,9 @@ - return $build_arch if defined $build_arch; - - my $build_arch = `dpkg --print-architecture`; -- # FIXME: Handle bootstrapping -- syserr("dpkg --print-architecture failed") if $? >> 8; -+ if ($? >> 8 || $build_arch =~ /^\s*$/) { -+ $build_arch = get_raw_host_arch(); -+ } - - chomp $build_arch; - return $build_arch; diff --git a/fedora-fix-CVE-2010-0396-00.patch b/fedora-fix-CVE-2010-0396-00.patch deleted file mode 100644 index 6f9fc07..0000000 --- a/fedora-fix-CVE-2010-0396-00.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm ---- a/scripts/Dpkg/Source/Patch.pm -+++ b/scripts/Dpkg/Source/Patch.pm -@@ -322,8 +322,9 @@ sub analyze { - error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); - } - $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { -+ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { - $fn = $_; -+ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; - } - if (/\.dpkg-orig$/) { - error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); -@@ -336,8 +337,9 @@ sub analyze { - error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); - } - $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^(\./)?[^/]+/}{$destdir/}) { -+ if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { - $fn2 = $_; -+ error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; - } else { - unless (defined $fn) { - error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), -@@ -363,6 +365,17 @@ sub analyze { - if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { - $dirtocreate{$dirname} = 1; - } -+ -+ # Sanity check, refuse to patch through a symlink -+ $dirname = $fn; -+ while (1) { -+ if (-l $dirname) { -+ error(_g("diff %s modifies file %s through a symlink: %s"), -+ $diff, $fn, $dirname); -+ } -+ last unless $dirname =~ s{/[^/]+$}{}; -+ } -+ - if (-e $fn and not -f _) { - error(_g("diff `%s' patches something which is not a plain file"), $diff); - } diff --git a/fedora-fix-CVE-2010-0396-01.patch b/fedora-fix-CVE-2010-0396-01.patch deleted file mode 100644 index c862e05..0000000 --- a/fedora-fix-CVE-2010-0396-01.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm ---- a/scripts/Dpkg/Source/Package/V3/quilt.pm -+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm -@@ -123,6 +123,7 @@ sub read_patch_list { - } - } - next if $opts{"skip_auto"} and $_ eq $auto_patch; -+ error(_g("%s contains an insecure path: %s"), $file, $_) if m{(^|/)\.\./}; - push @patches, $_; - } - close(SERIES); diff --git a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch b/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch deleted file mode 100644 index 26ce08d..0000000 --- a/fedora-fix-CVE-2010-1679_CVE-2011-0402.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Archive.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Archive.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -119,7 +119,7 @@ - # Call tar extraction process - $fork_opts{"delete_env"} = [ "TAR_OPTIONS" ]; - $fork_opts{'exec'} = [ 'tar', '--no-same-owner', '--no-same-permissions', -- @{$opts{"options"}}, '-xkf', '-' ]; -+ @{$opts{"options"}}, '-xf', '-' ]; - fork_and_exec(%fork_opts); - $self->cleanup_after_open(); - -@@ -142,7 +142,7 @@ - closedir(D); - my $done = 0; - erasedir($dest); -- if (scalar(@entries) == 1 && -d "$tmp/$entries[0]") { -+ if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) { - rename("$tmp/$entries[0]", $dest) || - syserr(_g("Unable to rename %s to %s"), - "$tmp/$entries[0]", $dest); -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Package/V2.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Package/V2.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -115,7 +115,12 @@ - # Extract main tarball - info(_g("unpacking %s"), $tarfile); - my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); -- $tar->extract($newdirectory, no_fixperms => 1); -+ $tar->extract($newdirectory, no_fixperms => 1, -+ options => [ "--anchored", "--no-wildcards-match-slash", -+ "--exclude", "*/.pc", "--exclude", ".pc" ]); -+ # The .pc exclusion is only needed for 3.0 (quilt) and to avoid -+ # having an upstream tarball provide a directory with symlinks -+ # that would be blindly followed when applying the patches - - # Extract additional orig tarballs - foreach my $subdir (keys %origtar) { -diff -ruN dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm ---- dpkg-1.15.5.6ubuntu4/scripts/Dpkg/Source/Patch.pm 2010-04-15 13:38:58.000000000 +0200 -+++ dpkg-1.15.5.6ubuntu4.5//scripts/Dpkg/Source/Patch.pm 2011-01-06 21:08:30.000000000 +0200 -@@ -313,11 +313,42 @@ - $header =~ s/\s.*// unless ($header =~ s/\t.*//); - return $header; - } -+ -+ sub intuit_file_patched { -+ my ($old, $new) = @_; -+ return $new unless defined $old; -+ return $old unless defined $new; -+ return $new if -e $new and not -e $old; -+ return $old if -e $old and not -e $new; -+ # We don't consider the case where both files are non-existent and -+ # where patch picks the one with the fewest directories to create -+ # since dpkg-source will pre-create the required directories -+ # -+ # Precalculate metrics used by patch -+ my ($tmp_o, $tmp_n) = ($old, $new); -+ my ($len_o, $len_n) = (length($old), length($new)); -+ $tmp_o =~ s{[/\\]+}{/}g; -+ $tmp_n =~ s{[/\\]+}{/}g; -+ my $nb_comp_o = ($tmp_o =~ tr{/}{/}); -+ my $nb_comp_n = ($tmp_n =~ tr{/}{/}); -+ $tmp_o =~ s{^.*/}{}; -+ $tmp_n =~ s{^.*/}{}; -+ my ($blen_o, $blen_n) = (length($tmp_o), length($tmp_n)); -+ # Decide like patch would -+ if ($nb_comp_o != $nb_comp_n) { -+ return ($nb_comp_o < $nb_comp_n) ? $old : $new; -+ } elsif ($blen_o != $blen_n) { -+ return ($blen_o < $blen_n) ? $old : $new; -+ } elsif ($len_o != $len_n) { -+ return ($len_o < $len_n) ? $old : $new; -+ } -+ return $old; -+ } - $_ = getline($diff_handle); - - HUNK: - while (defined($_) || not eof($diff_handle)) { -- my ($fn, $fn2); -+ my (%path, %fn); - # skip comments leading up to patch (if any) - until (/^--- /) { - last HUNK if not defined($_ = getline($diff_handle)); -@@ -327,11 +358,8 @@ - unless(s/^--- //) { - error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); - } -- $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { -- $fn = $_; -- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; -- } -+ $path{'old'} = $_ = strip_ts($_); -+ $fn{'old'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; - if (/\.dpkg-orig$/) { - error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); - } -@@ -342,46 +370,47 @@ - unless (s/^\+\+\+ //) { - error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); - } -- $_ = strip_ts($_); -- if ($_ eq '/dev/null' or s{^[^/]+/}{$destdir/}) { -- $fn2 = $_; -- error(_g("%s contains an insecure path: %s"), $diff, $_) if m{/\.\./}; -- } else { -- unless (defined $fn) { -- error(_g("none of the filenames in ---/+++ are relative in diff `%s' (line %d)"), -- $diff, $.); -- } -- } -+ $path{'new'} = $_ = strip_ts($_); -+ $fn{'new'} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; -+ -+ unless (defined $fn{'old'} or defined $fn{'new'}) { -+ error(_g("none of the filenames in ---/+++ are valid in diff '%s' (line %d)"), -+ $diff, $.); -+ } - -- if (defined($fn) and $fn eq '/dev/null') { -+ # Safety checks on both filenames that patch could use -+ foreach my $key ("old", "new") { -+ next unless defined $fn{$key}; -+ if ($path{$key} =~ m{/\.\./}) { -+ error(_g("%s contains an insecure path: %s"), $diff, $path{$key}); -+ } -+ my $path = $fn{$key}; -+ while (1) { -+ if (-l $path) { -+ error(_g("diff %s modifies file %s through a symlink: %s"), -+ $diff, $fn{$key}, $path); -+ } -+ last unless $path =~ s{/+[^/]*$}{}; -+ last if length($path) <= length($destdir); # $destdir is assumed safe -+ } -+ } -+ -+ if ($path{'old'} eq '/dev/null' and $path{'new'} eq '/dev/null') { - error(_g("original and modified files are /dev/null in diff `%s' (line %d)"), -- $diff, $.) if (defined($fn2) and $fn2 eq '/dev/null'); -- $fn = $fn2; -- } elsif (defined($fn2) and $fn2 ne '/dev/null') { -- $fn = $fn2 unless defined $fn; -- $fn = $fn2 if ((not -e $fn) and -e $fn2); -- } elsif (defined($fn2) and $fn2 eq '/dev/null') { -+ $diff, $.); -+ } elsif ($path{'new'} eq '/dev/null') { - error(_g("file removal without proper filename in diff `%s' (line %d)"), -- $diff, $. - 1) unless defined $fn; -+ $diff, $. - 1) unless defined $fn{'old'}; - warning(_g("diff %s removes a non-existing file %s (line %d)"), -- $diff, $fn, $.) unless -e $fn; -+ $diff, $fn{'old'}, $.) unless -e $fn{'old'}; - } -+ my $fn = intuit_file_patched($fn{'old'}, $fn{'new'}); - - my $dirname = $fn; - if ($dirname =~ s{/[^/]+$}{} && not -d $dirname) { - $dirtocreate{$dirname} = 1; - } - -- # Sanity check, refuse to patch through a symlink -- $dirname = $fn; -- while (1) { -- if (-l $dirname) { -- error(_g("diff %s modifies file %s through a symlink: %s"), -- $diff, $fn, $dirname); -- } -- last unless $dirname =~ s{/[^/]+$}{}; -- } -- - if (-e $fn and not -f _) { - error(_g("diff `%s' patches something which is not a plain file"), $diff); - } diff --git a/sources b/sources index a8b1462..13ad236 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4dcb0de9af234d16a62272bcc61b8873 dpkg_1.15.5.6.tar.bz2 +88d0e4c98ecb8afe6dee896a2aa9665d dpkg_1.16.16.tar.xz From 3b626ceb9007decdc3dcf3520ca4f2b4a12d5df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 Apr 2015 06:13:38 +0100 Subject: [PATCH 053/102] better upstream URL --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 4595c32..bb4faa4 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -13,7 +13,7 @@ Group: System Environment/Base # scripts/Dpkg/Gettext.pm - BSD # lib/compat/obstack.h, lib/compat/gettext.h,lib/compat/obstack.c - LGPLv2+ License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD -URL: http://packages.debian.org/unstable/admin/dpkg +URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch1: dpkg-fix-logrotate.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel From abc852bf85ffdc12232b937478bd3eb4ac5450e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Tue, 21 Apr 2015 13:23:28 +0100 Subject: [PATCH 054/102] Bump release version and fill the changelog . --- dpkg.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index bb4faa4..56bd74a 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.16.16 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -359,8 +359,13 @@ create_logfile %changelog +* Tue Apr 21 2015 Sérgio Basto - 1.16.16-3 +- Better upstream URL . + * Tue Apr 21 2015 Sérgio Basto - 1.16.16-2 -- some fixes and support for epel-6 +- Some fixes and added support for epel-6 . +- Removed Patch0: dpkg-perl-libexecdir.patch . +- move %{_libdir}/dpkg/parsechangelog to archable package . * Sun Apr 19 2015 Sérgio Basto - 1.16.16-1 - Security update to 1.16.16 From 491f87cd04a19d04f7acc0aa850ede359ad9718f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sat, 25 Apr 2015 15:57:11 +0100 Subject: [PATCH 055/102] Revert location of dpkg/parsechangelog . - Fix build for all versions, including epel-6 . --- dpkg.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 56bd74a..3cb9bdc 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,9 +1,10 @@ %global pkgconfdir %{_sysconfdir}/dpkg %global pkgdatadir %{_datadir}/dpkg +%global _libdir %{_libexecdir} Name: dpkg Version: 1.16.16 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -120,6 +121,11 @@ chmod +x %{__perl_requires} %build %if 0%{?rhel} != 5 && 0%{?rhel} != 6 +# We can't run autoreconf on epel <= 6 because needs gettext-0.18 when epel6 +# only have gettext-0.17: +# autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your configure.ac +# file requires the infrastructure from gettext-0.18 but this version +# is older. Please upgrade to gettext-0.18 or newer. autoreconf -fiv %endif %configure --disable-start-stop-daemon \ @@ -222,7 +228,6 @@ create_logfile %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride -%{_libdir}/dpkg/parsechangelog %dir %{pkgdatadir} %{pkgdatadir}/abitable %{pkgdatadir}/archtable @@ -279,6 +284,7 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor +%{_libexecdir}/dpkg/parsechangelog %{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz @@ -359,6 +365,10 @@ create_logfile %changelog +* Sat Apr 25 2015 Sérgio Basto - 1.16.16-4 +- Revert location of dpkg/parsechangelog . +- Fix build for all versions, including epel-6 . + * Tue Apr 21 2015 Sérgio Basto - 1.16.16-3 - Better upstream URL . From 96e50bb7f48b98754b6e12aeb7829fd88186ea33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sun, 26 Apr 2015 03:40:00 +0100 Subject: [PATCH 056/102] Fix build for all versions, previous try wasn't correct and back with dpkg-perl-libexecdir.epel6.patch . - Added dpkg-perl-libexecdir.epel6.patch just for fix epel <= 6 . - Cleaned some trailing whitespaces. - Use _localstatedir instead /var . --- dpkg-perl-libexecdir.epel6.patch | 20 ++++++++++++++ dpkg-perl-libexecdir.patch | 21 ++++++++++++++ dpkg.spec | 47 ++++++++++++++++++++------------ 3 files changed, 70 insertions(+), 18 deletions(-) create mode 100644 dpkg-perl-libexecdir.epel6.patch create mode 100644 dpkg-perl-libexecdir.patch diff --git a/dpkg-perl-libexecdir.epel6.patch b/dpkg-perl-libexecdir.epel6.patch new file mode 100644 index 0000000..b430247 --- /dev/null +++ b/dpkg-perl-libexecdir.epel6.patch @@ -0,0 +1,20 @@ +--- dpkg-1.16.16.epel6/scripts/Makefile.in 2015-04-09 07:47:16.000000000 +0100 ++++ dpkg-1.16.16/scripts/Makefile.in 2015-04-26 01:35:34.275309326 +0100 +@@ -338,7 +392,7 @@ bin_SCRIPTS = \ + dpkg-source \ + dpkg-vendor + +-changelogdir = $(pkglibdir)/parsechangelog ++changelogdir = $(pkglibexecdir)/parsechangelog + changelog_SCRIPTS = \ + changelog/debian + +@@ -431,7 +485,7 @@ nobase_dist_perllib_DATA = \ + man3_MANS = + do_perl_subst = $(AM_V_GEN) \ + sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ +- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ ++ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ + -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ + -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ + -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch new file mode 100644 index 0000000..8a8fbff --- /dev/null +++ b/dpkg-perl-libexecdir.patch @@ -0,0 +1,21 @@ +diff -up ./scripts/Makefile.am.orig ./scripts/Makefile.am +--- ./scripts/Makefile.am.orig 2013-05-17 02:17:58.619324599 -0400 ++++ ./scripts/Makefile.am 2013-05-17 02:18:35.256329078 -0400 +@@ -21,7 +21,7 @@ bin_SCRIPTS = \ + dpkg-source \ + dpkg-vendor + +-changelogdir = $(pkglibdir)/parsechangelog ++changelogdir = $(pkglibexecdir)/parsechangelog + changelog_SCRIPTS = \ + changelog/debian + +@@ -115,7 +115,7 @@ man3_MANS = + + do_perl_subst = $(AM_V_GEN) \ + sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ +- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ ++ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ + -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ + -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ + -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" diff --git a/dpkg.spec b/dpkg.spec index 3cb9bdc..e74444f 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,10 +1,9 @@ %global pkgconfdir %{_sysconfdir}/dpkg %global pkgdatadir %{_datadir}/dpkg -%global _libdir %{_libexecdir} Name: dpkg Version: 1.16.16 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -16,7 +15,9 @@ Group: System Environment/Base License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz +Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch +Patch2: dpkg-perl-libexecdir.epel6.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel BuildRequires: doxygen flex xz-devel po4a @@ -26,19 +27,18 @@ BuildRequires: dotconf-devel # for /usr/bin/pod2man %if 0%{?fedora} > 18 BuildRequires: perl-podlators -%else +%else BuildRequires: perl %endif -%description - -This package contains the tools (including dpkg-source) required +%description +This package contains the tools (including dpkg-source) required to unpack, build and upload Debian source packages. -This package also contains the programs dpkg which used to handle the +This package also contains the programs dpkg which used to handle the installation and removal of packages on a Debian system. -This package also contains dselect, an interface for managing the +This package also contains dselect, an interface for managing the installation and removal of packages on the system. dpkg and dselect will certainly be non-functional on a rpm-based system @@ -103,11 +103,15 @@ Group: System Environment/Base Requires: %{name} = %{version}-%{release} %description -n dselect -dselect is a high-level interface for the installation/removal of debs . +dselect is a high-level interface for the installation/removal of debs . %prep %setup -q +%patch0 -p1 %patch1 -p1 +%if 0%{?rhel} <= 6 +%patch2 -p1 +%endif # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -177,12 +181,12 @@ rm -rf %{buildroot}%{_mandir}/*/man8/update-alternatives.8 rm -rf %{buildroot}%{_sysconfdir}/alternatives/ #fedora has own implemenation -#FIXME should we remove this ? +#FIXME should we remove this ? rm -rf %{buildroot}%{_sbindir}/install-info -mkdir -p %{buildroot}/var/lib/dpkg/alternatives %{buildroot}/var/lib/dpkg/info \ - %{buildroot}/var/lib/dpkg/parts %{buildroot}/var/lib/dpkg/updates \ - %{buildroot}/var/lib/dpkg/methods +mkdir -p %{buildroot}%{_localstatedir}/lib/dpkg/alternatives %{buildroot}%{_localstatedir}/lib/dpkg/info \ + %{buildroot}%{_localstatedir}/lib/dpkg/parts %{buildroot}%{_localstatedir}/lib/dpkg/updates \ + %{buildroot}%{_localstatedir}/lib/dpkg/methods %post @@ -234,10 +238,10 @@ create_logfile %{pkgdatadir}/cputable %{pkgdatadir}/ostable %{pkgdatadir}/triplettable -%dir /var/lib/dpkg/alternatives -%dir /var/lib/dpkg/info -%dir /var/lib/dpkg/parts -%dir /var/lib/dpkg/updates +%dir %{_localstatedir}/lib/dpkg/alternatives +%dir %{_localstatedir}/lib/dpkg/info +%dir %{_localstatedir}/lib/dpkg/parts +%dir %{_localstatedir}/lib/dpkg/updates %{_mandir}/man1/dpkg.1.gz %{_mandir}/man1/dpkg-deb.1.gz %{_mandir}/man1/dpkg-maintscript-helper.1.gz @@ -361,10 +365,17 @@ create_logfile %{_mandir}/man5/dselect.cfg.5.gz %{_mandir}/*/man5/dselect.cfg.5.gz %dir %{pkgconfdir}/dselect.cfg.d -/var/lib/dpkg/methods +%{_localstatedir}/lib/dpkg/methods %changelog +* Sun Apr 26 2015 Sérgio Basto - 1.16.16-5 +- Fix build for all versions, previous try wasn't correct and back with + dpkg-perl-libexecdir.epel6.patch . +- Added dpkg-perl-libexecdir.epel6.patch just for fix epel <= 6 . +- Cleaned some trailing whitespaces. +- Use _localstatedir instead /var . + * Sat Apr 25 2015 Sérgio Basto - 1.16.16-4 - Revert location of dpkg/parsechangelog . - Fix build for all versions, including epel-6 . From a4ede0c0743953ffdaec81621d8abf60701a2daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Basto?= Date: Sun, 26 Apr 2015 04:19:49 +0100 Subject: [PATCH 057/102] Fix changelog --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index e74444f..4116480 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -371,7 +371,7 @@ create_logfile %changelog * Sun Apr 26 2015 Sérgio Basto - 1.16.16-5 - Fix build for all versions, previous try wasn't correct and back with - dpkg-perl-libexecdir.epel6.patch . + dpkg-perl-libexecdir.patch . - Added dpkg-perl-libexecdir.epel6.patch just for fix epel <= 6 . - Cleaned some trailing whitespaces. - Use _localstatedir instead /var . From 10212446e081dbeaa6aa9dd109bb89a9e5991656 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 04:22:04 +0000 Subject: [PATCH 058/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 4116480..bb0a2da 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.16.16 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -369,6 +369,9 @@ create_logfile %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.16.16-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sun Apr 26 2015 Sérgio Basto - 1.16.16-5 - Fix build for all versions, previous try wasn't correct and back with dpkg-perl-libexecdir.patch . From 396cf58aaa4f7b1ba93d51086bf4c5b5641b58bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 2 Jul 2015 13:03:52 +0100 Subject: [PATCH 059/102] Update to 1.17.25 (Debian stable), adjustments following files dpkg-1.17.25/debian/*.install, *.postinst, etc. - Rebased dpkg-perl-libexecdir.patch and dpkg-perl-libexecdir.epel6.patch - Removed old defattr tags. - Added License tag. --- .gitignore | 1 + dpkg-perl-libexecdir.epel6.patch | 22 ++++++++--------- dpkg-perl-libexecdir.patch | 21 ++++++++-------- dpkg.spec | 41 ++++++++++++++++++-------------- sources | 2 +- 5 files changed, 46 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index 46d6960..adfcdfa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.14.tar.xz /dpkg_1.16.15.tar.xz /dpkg_1.16.16.tar.xz +/dpkg_1.17.25.tar.xz diff --git a/dpkg-perl-libexecdir.epel6.patch b/dpkg-perl-libexecdir.epel6.patch index b430247..4327d42 100644 --- a/dpkg-perl-libexecdir.epel6.patch +++ b/dpkg-perl-libexecdir.epel6.patch @@ -1,6 +1,6 @@ ---- dpkg-1.16.16.epel6/scripts/Makefile.in 2015-04-09 07:47:16.000000000 +0100 -+++ dpkg-1.16.16/scripts/Makefile.in 2015-04-26 01:35:34.275309326 +0100 -@@ -338,7 +392,7 @@ bin_SCRIPTS = \ +--- ./scripts/Makefile.in.orig 2015-04-10 01:37:03.000000000 +0100 ++++ ./scripts/Makefile.in 2015-07-02 04:16:51.404577510 +0100 +@@ -415,7 +415,7 @@ bin_SCRIPTS = \ dpkg-source \ dpkg-vendor @@ -9,12 +9,12 @@ changelog_SCRIPTS = \ changelog/debian -@@ -431,7 +485,7 @@ nobase_dist_perllib_DATA = \ - man3_MANS = - do_perl_subst = $(AM_V_GEN) \ +@@ -516,7 +516,7 @@ do_perl_subst = $(AM_V_GEN) \ sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ -- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ -+ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ - -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ - -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ - -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" + -e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \ + -e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \ +- -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \ ++ -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibexecdir)':" \ + -e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \ + -e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':" + diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch index 8a8fbff..dc27f72 100644 --- a/dpkg-perl-libexecdir.patch +++ b/dpkg-perl-libexecdir.patch @@ -1,6 +1,5 @@ -diff -up ./scripts/Makefile.am.orig ./scripts/Makefile.am ---- ./scripts/Makefile.am.orig 2013-05-17 02:17:58.619324599 -0400 -+++ ./scripts/Makefile.am 2013-05-17 02:18:35.256329078 -0400 +--- ./scripts/Makefile.am.orig 2015-04-09 23:09:22.000000000 +0100 ++++ ./scripts/Makefile.am 2015-07-02 02:45:12.844920000 +0100 @@ -21,7 +21,7 @@ bin_SCRIPTS = \ dpkg-source \ dpkg-vendor @@ -10,12 +9,12 @@ diff -up ./scripts/Makefile.am.orig ./scripts/Makefile.am changelog_SCRIPTS = \ changelog/debian -@@ -115,7 +115,7 @@ man3_MANS = - - do_perl_subst = $(AM_V_GEN) \ +@@ -123,7 +123,7 @@ do_perl_subst = $(AM_V_GEN) \ sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ -- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ -+ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ - -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ - -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ - -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" + -e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \ + -e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \ +- -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \ ++ -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibexecdir)':" \ + -e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \ + -e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':" + diff --git a/dpkg.spec b/dpkg.spec index bb0a2da..bd0fe3e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.16.16 -Release: 6%{?dist} +Version: 1.17.25 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -109,7 +109,7 @@ dselect is a high-level interface for the installation/removal of debs . %setup -q %patch0 -p1 %patch1 -p1 -%if 0%{?rhel} <= 6 +%if 0%{?rhel} == 5 || 0%{?rhel} == 6 %patch2 -p1 %endif @@ -160,8 +160,9 @@ ln -sf fedora %{buildroot}/%{pkgconfdir}/origins/default %endif # from debian/dpkg.install -install -pm0644 debian/archtable %{buildroot}/%{pkgdatadir}/archtable +install -pm0644 scripts/mk/*mk %{buildroot}/%{pkgdatadir} install -pm0644 debian/dpkg.cfg %{buildroot}/%{pkgconfdir} +install -pm0644 debian/dselect.cfg %{buildroot}/%{pkgconfdir} install -pm0644 debian/shlibs.default %{buildroot}/%{pkgconfdir} install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir} @@ -213,11 +214,10 @@ create_database create_logfile -%files -f dpkg.lang -%defattr(-,root,root,-) +%files -f dpkg.lang %doc debian/changelog README AUTHORS THANKS TODO -%doc debian/copyright debian/usertags -%doc doc/README.feature-removal-schedule doc/triggers.txt +%doc doc/README.feature-removal-schedule debian/usertags debian/dpkg.cron.daily +%license debian/copyright %dir %{pkgconfdir} %dir %{pkgconfdir}/dpkg.cfg.d %dir %{pkgconfdir}/origins @@ -234,10 +234,10 @@ create_logfile %{_bindir}/dpkg-statoverride %dir %{pkgdatadir} %{pkgdatadir}/abitable -%{pkgdatadir}/archtable %{pkgdatadir}/cputable %{pkgdatadir}/ostable %{pkgdatadir}/triplettable +%{pkgdatadir}/*mk %dir %{_localstatedir}/lib/dpkg/alternatives %dir %{_localstatedir}/lib/dpkg/info %dir %{_localstatedir}/lib/dpkg/parts @@ -262,14 +262,13 @@ create_logfile %{_mandir}/*/man8/dpkg-statoverride.8.gz %files devel -%defattr(-,root,root,-) %{_libdir}/libdpkg.a +%exclude %{_libdir}/libdpkg.la %{_libdir}/pkgconfig/libdpkg.pc %{_includedir}/dpkg/*.h -%files dev -%defattr(-,root,root,-) -%doc doc/README.api doc/coding-style.txt doc/frontend.txt +%files dev -f dpkg-dev.lang +%doc AUTHORS THANKS debian/usertags doc/README.api doc/README.feature-removal-schedule doc/frontend.txt doc/triggers.txt %config(noreplace) %{pkgconfdir}/shlibs.default %config(noreplace) %{pkgconfdir}/shlibs.override %{_bindir}/dpkg-architecture @@ -349,26 +348,32 @@ create_logfile %{_mandir}/*/man5/deb-version.5.gz %{_mandir}/*/man5/deb.5.gz -%files perl -f dpkg-dev.lang -%defattr(-,root,root,-) +%files perl %{perl_vendorlib}/Dpkg* %{_mandir}/man3/Dpkg*.3* %files -n dselect -f dselect.lang -%defattr(-,root,root,-) %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt +%config(noreplace) %{pkgconfdir}/dselect.cfg %{_bindir}/dselect -%{perl_vendorlib}/Debian +%{perl_vendorlib}/Dselect %{_libdir}/dpkg/methods %{_mandir}/man1/dselect.1.gz %{_mandir}/*/man1/dselect.1.gz %{_mandir}/man5/dselect.cfg.5.gz %{_mandir}/*/man5/dselect.cfg.5.gz %dir %{pkgconfdir}/dselect.cfg.d -%{_localstatedir}/lib/dpkg/methods +%dir %{_localstatedir}/lib/dpkg/methods %changelog +* Thu Jul 02 2015 Sérgio Basto - 1.17.25-1 +- Update to 1.17.25 (Debian stable), adjustments following files + dpkg-1.17.25/debian/*.install, *.postinst, etc. +- Rebased dpkg-perl-libexecdir.patch and dpkg-perl-libexecdir.epel6.patch +- Removed old defattr tags. +- Added License tag. + * Wed Jun 17 2015 Fedora Release Engineering - 1.16.16-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 13ad236..d17d0ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -88d0e4c98ecb8afe6dee896a2aa9665d dpkg_1.16.16.tar.xz +e48fcfdb2162e77d72c2a83432d537ca dpkg_1.17.25.tar.xz From 1078217518ebde232c746179bb81c937b1d3b5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 2 Jul 2015 13:16:21 +0100 Subject: [PATCH 060/102] Added BR libtool --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index bd0fe3e..8da6009 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -19,7 +19,7 @@ Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel -BuildRequires: autoconf automake gettext-devel +BuildRequires: autoconf automake gettext-devel libtool BuildRequires: doxygen flex xz-devel po4a %if 0%{?rhel} != 5 && 0%{?rhel} != 6 BuildRequires: dotconf-devel From ac718c9557b712a3aab55d4d9a6aa9daaab74f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 2 Jul 2015 15:14:31 +0100 Subject: [PATCH 061/102] Deleted the unused dpkg.archtable file. --- dpkg.archtable | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 dpkg.archtable diff --git a/dpkg.archtable b/dpkg.archtable deleted file mode 100644 index a50328b..0000000 --- a/dpkg.archtable +++ /dev/null @@ -1,29 +0,0 @@ -# This file contains the list of architecture names in Debian's ‘sid’ -# distribution. -# -# Architecture names are formed as a combination of the system name -# (from ostable) and CPU name (from cputable) after mapping from -# the Debian triplet (from triplettable). Support for new -# architectures in dpkg is added in those files, architecture names -# are only added to this file when added to the distribution. -# -# Column 1 is present for historical reasons only, and should be ignored. -# Column 2 contains the Debian name for the architecture, which is returned -# by ‘dpkg --print-architecture’. -# -# -i486-linux-gnu i386 -ia64-linux-gnu ia64 -alpha-linux-gnu alpha -x86_64-linux-gnu amd64 -arm-linux-gnu arm -arm-linux-gnueabi armel -hppa-linux-gnu hppa -mips-linux-gnu mips -mipsel-linux-gnu mipsel -powerpc-linux-gnu powerpc -s390-linux-gnu s390 -sparc-linux-gnu sparc -i486-gnu hurd-i386 -i486-kfreebsd-gnu kfreebsd-i386 -x86_64-kfreebsd-gnu kfreebsd-amd64 From 18e5a7c54b6ab3537ab51414de911ab854f0d242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 10 Jul 2015 19:28:12 +0100 Subject: [PATCH 062/102] call 'tar --no-recursion -T -' and not 'tar -T - --no-recursion' (#1241508) --- dpkg-tar-invocation.patch | 11 +++++++++++ dpkg.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 dpkg-tar-invocation.patch diff --git a/dpkg-tar-invocation.patch b/dpkg-tar-invocation.patch new file mode 100644 index 0000000..1f2c5ff --- /dev/null +++ b/dpkg-tar-invocation.patch @@ -0,0 +1,11 @@ +--- ./dpkg-deb/build.c.orig 2015-07-10 19:19:17.042932959 +0100 ++++ ./dpkg-deb/build.c 2015-07-10 19:22:43.536320418 +0100 +@@ -560,7 +560,7 @@ do_build(const char *const *argv) + if (chdir(dir)) + ohshite(_("failed to chdir to `%.255s'"), dir); + execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "--no-unquote", +- "-T", "-", "--no-recursion", NULL); ++ "--no-recursion", "-T", "-", NULL); + ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR); + } + close(p1[0]); diff --git a/dpkg.spec b/dpkg.spec index 8da6009..af24393 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.17.25 -Release: 1%{?dist} +Release: 3%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -18,6 +18,7 @@ Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version} Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch +Patch3: dpkg-tar-invocation.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel libtool BuildRequires: doxygen flex xz-devel po4a @@ -112,6 +113,7 @@ dselect is a high-level interface for the installation/removal of debs . %if 0%{?rhel} == 5 || 0%{?rhel} == 6 %patch2 -p1 %endif +%patch3 -p1 # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -367,6 +369,9 @@ create_logfile %changelog +* Fri Jul 10 2015 Sérgio Basto - 1.17.25-3 +- call 'tar --no-recursion -T -' and not 'tar -T - --no-recursion' (#1241508) + * Thu Jul 02 2015 Sérgio Basto - 1.17.25-1 - Update to 1.17.25 (Debian stable), adjustments following files dpkg-1.17.25/debian/*.install, *.postinst, etc. From 5294a9c0e4a33eb3e420c1e43c5a29814d4a5d4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 22 Jul 2015 17:48:06 +0200 Subject: [PATCH 063/102] Require perl(:MODULE_COMPAT_) symbol by packages that provide Perl modules --- dpkg.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index af24393..0c22505 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.17.25 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -25,11 +25,11 @@ BuildRequires: doxygen flex xz-devel po4a %if 0%{?rhel} != 5 && 0%{?rhel} != 6 BuildRequires: dotconf-devel %endif +# for /usr/bin/perl +BuildRequires: perl # for /usr/bin/pod2man %if 0%{?fedora} > 18 BuildRequires: perl-podlators -%else -BuildRequires: perl %endif %description @@ -74,6 +74,7 @@ Required to unpack, build and upload Debian source packages Summary: Dpkg perl modules Group: System Environment/Base Requires: dpkg = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl, perl-TimeDate BuildArch: noarch @@ -102,6 +103,7 @@ there are the following modules: Summary: Debian package management front-end Group: System Environment/Base Requires: %{name} = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description -n dselect dselect is a high-level interface for the installation/removal of debs . @@ -369,6 +371,9 @@ create_logfile %changelog +* Wed Jul 22 2015 Petr Pisar - 1.17.25-4 +- Require perl(:MODULE_COMPAT_) symbol by packages that provide Perl modules + * Fri Jul 10 2015 Sérgio Basto - 1.17.25-3 - call 'tar --no-recursion -T -' and not 'tar -T - --no-recursion' (#1241508) From 5d4b450d62f0c2838850cb59713c2cf06baf0e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 17 Oct 2015 13:19:56 +0100 Subject: [PATCH 064/102] Fix rhbz #1271133 --- dpkg.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 0c22505..a7abde4 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.17.25 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -115,7 +115,7 @@ dselect is a high-level interface for the installation/removal of debs . %if 0%{?rhel} == 5 || 0%{?rhel} == 6 %patch2 -p1 %endif -%patch3 -p1 +%patch3 -p1 -b .tar # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -134,7 +134,7 @@ chmod +x %{__perl_requires} # autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your configure.ac # file requires the infrastructure from gettext-0.18 but this version # is older. Please upgrade to gettext-0.18 or newer. -autoreconf -fiv +autoreconf %endif %configure --disable-start-stop-daemon \ --disable-linker-optimisations \ @@ -149,8 +149,6 @@ make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} -mkdir -p %{buildroot}/%{pkgconfdir}/dpkg.cfg.d -mkdir -p %{buildroot}/%{pkgconfdir}/dselect.cfg.d mkdir -p %{buildroot}/%{pkgconfdir}/origins # Prepare "vendor" files for dpkg-vendor @@ -164,7 +162,6 @@ ln -sf fedora %{buildroot}/%{pkgconfdir}/origins/default %endif # from debian/dpkg.install -install -pm0644 scripts/mk/*mk %{buildroot}/%{pkgdatadir} install -pm0644 debian/dpkg.cfg %{buildroot}/%{pkgconfdir} install -pm0644 debian/dselect.cfg %{buildroot}/%{pkgconfdir} install -pm0644 debian/shlibs.default %{buildroot}/%{pkgconfdir} @@ -174,11 +171,12 @@ install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir} mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} - %find_lang dpkg %find_lang dpkg-dev %find_lang dselect +rm %{buildroot}%{_libdir}/libdpkg.la + # fedora has its own implementation rm %{buildroot}%{_bindir}/update-alternatives rm %{buildroot}%{_mandir}/man8/update-alternatives.8 @@ -267,7 +265,6 @@ create_logfile %files devel %{_libdir}/libdpkg.a -%exclude %{_libdir}/libdpkg.la %{_libdir}/pkgconfig/libdpkg.pc %{_includedir}/dpkg/*.h @@ -371,6 +368,9 @@ create_logfile %changelog +* Sat Oct 17 2015 Sérgio Basto - 1.17.25-5 +- Fix rhbz #1271133 + * Wed Jul 22 2015 Petr Pisar - 1.17.25-4 - Require perl(:MODULE_COMPAT_) symbol by packages that provide Perl modules From 1fb1c13cbeb62ebab5222863e4b93582aa38f018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 17 Oct 2015 14:43:01 +0100 Subject: [PATCH 065/102] Following debian/libdpkg-perl.install _libexecdir/dpkg/parsechangelog moved into dpkg-perl. - Removed duplicated entries of _datadir/dpkg/*.mk in %files, following debian/dpkg-dev.install now only in dpkg-dev. --- dpkg.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index a7abde4..2dd1f07 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.17.25 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -239,7 +239,6 @@ create_logfile %{pkgdatadir}/cputable %{pkgdatadir}/ostable %{pkgdatadir}/triplettable -%{pkgdatadir}/*mk %dir %{_localstatedir}/lib/dpkg/alternatives %dir %{_localstatedir}/lib/dpkg/info %dir %{_localstatedir}/lib/dpkg/parts @@ -288,7 +287,6 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor -%{_libexecdir}/dpkg/parsechangelog %{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz @@ -352,6 +350,8 @@ create_logfile %files perl %{perl_vendorlib}/Dpkg* %{_mandir}/man3/Dpkg*.3* +%{_libexecdir}/dpkg/parsechangelog + %files -n dselect -f dselect.lang %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt @@ -368,8 +368,15 @@ create_logfile %changelog +* Sat Oct 17 2015 Sérgio Basto - 1.17.25-6 +- Following debian/libdpkg-perl.install _libexecdir/dpkg/parsechangelog moved + into dpkg-perl. +- Removed duplicated entries of _datadir/dpkg/*.mk in %%files, following + debian/dpkg-dev.install now only in dpkg-dev. + * Sat Oct 17 2015 Sérgio Basto - 1.17.25-5 - Fix rhbz #1271133 +- Spec cleanups. * Wed Jul 22 2015 Petr Pisar - 1.17.25-4 - Require perl(:MODULE_COMPAT_) symbol by packages that provide Perl modules From 8549736e3ed54c4746551851d07f1256ae3158c0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 18:58:16 +0000 Subject: [PATCH 066/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 2dd1f07..df16520 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.17.25 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -368,6 +368,9 @@ create_logfile %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 1.17.25-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Sat Oct 17 2015 Sérgio Basto - 1.17.25-6 - Following debian/libdpkg-perl.install _libexecdir/dpkg/parsechangelog moved into dpkg-perl. From cae3be1c995fd7c237120271b54d8b1bf8933906 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Tue, 17 May 2016 04:58:42 +0200 Subject: [PATCH 067/102] Perl 5.24 rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index df16520..690ddd4 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.17.25 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -368,6 +368,9 @@ create_logfile %changelog +* Tue May 17 2016 Jitka Plesnikova - 1.17.25-8 +- Perl 5.24 rebuild + * Wed Feb 03 2016 Fedora Release Engineering - 1.17.25-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 9e9067a0fae78f99f1d83770528a7891c2bfe8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 24 Jun 2016 10:02:37 +0200 Subject: [PATCH 068/102] Mandatory Perl build-requires added --- dpkg.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/dpkg.spec b/dpkg.spec index 690ddd4..82f4e32 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -27,6 +27,7 @@ BuildRequires: dotconf-devel %endif # for /usr/bin/perl BuildRequires: perl +BuildRequires: perl-generators # for /usr/bin/pod2man %if 0%{?fedora} > 18 BuildRequires: perl-podlators From fa7a22e2308f2bb17b7fffbbfdf520e7c65c56b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 25 Nov 2016 17:34:21 +0000 Subject: [PATCH 069/102] New upstream vesion, 1.17.27, fixes CVE-2015-0860 - Add start-stop-daemon because could be useful: https://github.com/gammu/gammu/issues/75 (RH system not support start-stop-daemon) - Drop dpkg-tar-invocation.patch it is already is sources. --- .gitignore | 1 + dpkg-tar-invocation.patch | 11 ----------- dpkg.spec | 18 ++++++++++++------ sources | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 dpkg-tar-invocation.patch diff --git a/.gitignore b/.gitignore index adfcdfa..a9db886 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.15.tar.xz /dpkg_1.16.16.tar.xz /dpkg_1.17.25.tar.xz +/dpkg_1.17.27.tar.xz diff --git a/dpkg-tar-invocation.patch b/dpkg-tar-invocation.patch deleted file mode 100644 index 1f2c5ff..0000000 --- a/dpkg-tar-invocation.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./dpkg-deb/build.c.orig 2015-07-10 19:19:17.042932959 +0100 -+++ ./dpkg-deb/build.c 2015-07-10 19:22:43.536320418 +0100 -@@ -560,7 +560,7 @@ do_build(const char *const *argv) - if (chdir(dir)) - ohshite(_("failed to chdir to `%.255s'"), dir); - execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "--no-unquote", -- "-T", "-", "--no-recursion", NULL); -+ "--no-recursion", "-T", "-", NULL); - ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR); - } - close(p1[0]); diff --git a/dpkg.spec b/dpkg.spec index 82f4e32..632350a 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.17.25 -Release: 8%{?dist} +Version: 1.17.27 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -18,7 +18,6 @@ Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version} Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch -Patch3: dpkg-tar-invocation.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel libtool BuildRequires: doxygen flex xz-devel po4a @@ -116,7 +115,6 @@ dselect is a high-level interface for the installation/removal of debs . %if 0%{?rhel} == 5 || 0%{?rhel} == 6 %patch2 -p1 %endif -%patch3 -p1 -b .tar # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -137,8 +135,7 @@ chmod +x %{__perl_requires} # is older. Please upgrade to gettext-0.18 or newer. autoreconf %endif -%configure --disable-start-stop-daemon \ - --disable-linker-optimisations \ +%configure --disable-linker-optimisations \ --with-admindir=%{_localstatedir}/lib/dpkg \ --with-selinux \ --with-zlib \ @@ -235,6 +232,7 @@ create_logfile %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride +%{_sbindir}/start-stop-daemon %dir %{pkgdatadir} %{pkgdatadir}/abitable %{pkgdatadir}/cputable @@ -253,6 +251,7 @@ create_logfile %{_mandir}/man5/dpkg.cfg.5.gz %{_mandir}/man8/dpkg-divert.8.gz %{_mandir}/man8/dpkg-statoverride.8.gz +%{_mandir}/man8/start-stop-daemon.8.gz %{_mandir}/*/man1/dpkg.1.gz %{_mandir}/*/man1/dpkg-deb.1.gz %{_mandir}/*/man1/dpkg-maintscript-helper.1.gz @@ -262,6 +261,7 @@ create_logfile %{_mandir}/*/man5/dpkg.cfg.5.gz %{_mandir}/*/man8/dpkg-divert.8.gz %{_mandir}/*/man8/dpkg-statoverride.8.gz +%{_mandir}/*/man8/start-stop-daemon.8.gz %files devel %{_libdir}/libdpkg.a @@ -369,6 +369,12 @@ create_logfile %changelog +* Fri Nov 25 2016 Sérgio Basto - 1.17.27-1 +- New upstream vesion, 1.17.27, fixes CVE-2015-0860 +- Add start-stop-daemon because could be useful: https://github.com/gammu/gammu/issues/75 (RH + system not support start-stop-daemon) +- Drop dpkg-tar-invocation.patch it is already is sources. + * Tue May 17 2016 Jitka Plesnikova - 1.17.25-8 - Perl 5.24 rebuild diff --git a/sources b/sources index d17d0ea..0a351dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e48fcfdb2162e77d72c2a83432d537ca dpkg_1.17.25.tar.xz +6e2d761a3c4a9a9e1856337557ec1f9e dpkg_1.17.27.tar.xz From 390dec1be820f313cfec1fe9744179989863afd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 26 Nov 2016 01:19:00 +0000 Subject: [PATCH 070/102] New major release, 1.18.15 --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 632350a..f39299b 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,7 +2,7 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.17.27 +Version: 1.18.15 Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base @@ -369,6 +369,9 @@ create_logfile %changelog +* Sat Nov 26 2016 Sérgio Basto - 1.18.15-1 +- New major release, 1.18.15 + * Fri Nov 25 2016 Sérgio Basto - 1.17.27-1 - New upstream vesion, 1.17.27, fixes CVE-2015-0860 - Add start-stop-daemon because could be useful: https://github.com/gammu/gammu/issues/75 (RH From ae9a3d38f94051a58db70a7655f4069d7e51d719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Mon, 28 Nov 2016 03:35:52 +0000 Subject: [PATCH 071/102] New major release, 1.18.15, adaptations based on files of debian directory in debian package. --- .gitignore | 1 + dpkg.spec | 146 ++++++++++++++++++++++++++++++++++++++--------------- sources | 2 +- 3 files changed, 108 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index a9db886..a0620d4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.16.tar.xz /dpkg_1.17.25.tar.xz /dpkg_1.17.27.tar.xz +/dpkg_1.18.15.tar.xz diff --git a/dpkg.spec b/dpkg.spec index f39299b..d0a3081 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -26,6 +26,7 @@ BuildRequires: dotconf-devel %endif # for /usr/bin/perl BuildRequires: perl +BuildRequires: perl-devel BuildRequires: perl-generators # for /usr/bin/pod2man %if 0%{?fedora} > 18 @@ -33,6 +34,9 @@ BuildRequires: perl-podlators %endif %description +This package provides the low-level infrastructure for handling the +installation and removal of Debian software packages. + This package contains the tools (including dpkg-source) required to unpack, build and upload Debian source packages. @@ -45,6 +49,7 @@ installation and removal of packages on the system. dpkg and dselect will certainly be non-functional on a rpm-based system because packages dependencies will likely be unmet. + %package devel Summary: Debian package management static library Group: Development/System @@ -67,37 +72,61 @@ Obsoletes: dpkg-devel < 1.16 BuildArch: noarch %description dev -This package provides the development tools (including dpkg-source). -Required to unpack, build and upload Debian source packages +This package provides the development tools (including dpkg-source) +required to unpack, build and upload Debian source packages. + . +Most Debian source packages will require additional tools to build; +for example, most packages need make and the C compiler gcc. %package perl Summary: Dpkg perl modules Group: System Environment/Base Requires: dpkg = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) -Requires: perl, perl-TimeDate +Requires: perl-TimeDate BuildArch: noarch %description perl This package provides the perl modules used by the scripts -in dpkg-dev. They cover a wide range of functionalities. Among them -there are the following modules: - - Dpkg::Arch: manipulate Debian architecture information - - Dpkg::BuildOptions: parse and manipulate DEB_BUILD_OPTIONS - - Dpkg::Changelog: parse Debian changelogs - - Dpkg::Checksums: generate and parse checksums - - Dpkg::Compression::Process: wrapper around compression tools - - Dpkg::Compression::FileHandle: transparently (de)compress files - - Dpkg::Control: parse and manipulate Debian control information - (.dsc, .changes, Packages/Sources entries, etc.) - - Dpkg::Deps: parse and manipulate dependencies - - Dpkg::ErrorHandling: common error functions - - Dpkg::Index: collections of Dpkg::Control (Packages/Sources files for - example) - - Dpkg::IPC: spawn sub-processes and feed/retrieve data - - Dpkg::Substvars: substitute variables in strings - - Dpkg::Vendor: identify current distribution vendor - - Dpkg::Version: parse and manipulate Debian package versions +in dpkg-dev. They cover a wide range of functionality. Among them +there are the following public modules: +. + - Dpkg: core variables + - Dpkg::Arch: architecture handling functions + - Dpkg::Build::Info: build information functions + - Dpkg::BuildFlags: set, modify and query compilation build flags + - Dpkg::BuildOptions: parse and manipulate DEB_BUILD_OPTIONS + - Dpkg::BuildProfile: parse and manipulate build profiles + - Dpkg::Changelog: parse changelogs + - Dpkg::Changelog::Entry: represents a changelog entry + - Dpkg::Changelog::Parse: generic changelog parser for dpkg-parsechangelog + - Dpkg::Checksums: generate and parse checksums + - Dpkg::Compression: simple database of available compression methods + - Dpkg::Compression::Process: wrapper around compression tools + - Dpkg::Compression::FileHandle: transparently (de)compress files + - Dpkg::Conf: parse dpkg configuration files + - Dpkg::Control: parse and manipulate Debian control information + (.dsc, .changes, Packages/Sources entries, etc.) + - Dpkg::Control::Changelog: represent fields output by dpkg-parsechangelog + - Dpkg::Control::Fields: manage (list of known) control fields + - Dpkg::Control::Hash: parse and manipulate a block of RFC822-like fields + - Dpkg::Control::Info: parse files like debian/control + - Dpkg::Control::Tests: parse files like debian/tests/control + - Dpkg::Deps: parse and manipulate dependencies + - Dpkg::Exit: push, pop and run exit handlers + - Dpkg::Gettext: wrapper around Locale::gettext + - Dpkg::IPC: spawn sub-processes and feed/retrieve data + - Dpkg::Index: collections of Dpkg::Control (Packages/Sources files for + example) + - Dpkg::Interface::Storable: base object serializer + - Dpkg::Path: common path handling functions + - Dpkg::Source::Package: extract Debian source packages + - Dpkg::Substvars: substitute variables in strings + - Dpkg::Vendor: identify current distribution vendor + - Dpkg::Version: parse and manipulate Debian package versions +. +All the packages listed in Suggests or Recommends are used by some of the +modules. %package -n dselect Summary: Debian package management front-end @@ -106,11 +135,14 @@ Requires: %{name} = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description -n dselect -dselect is a high-level interface for the installation/removal of debs . +dselect is a high-level interface for managing the installation and +removal of Debian software packages. +. +Many users find dselect intimidating and new users may prefer to use apt-based user interfaces. %prep %setup -q -%patch0 -p1 +#patch0 -p1 %patch1 -p1 %if 0%{?rhel} == 5 || 0%{?rhel} == 6 %patch2 -p1 @@ -137,10 +169,14 @@ autoreconf %endif %configure --disable-linker-optimisations \ --with-admindir=%{_localstatedir}/lib/dpkg \ - --with-selinux \ - --with-zlib \ - --with-bz2 - + --with-libselinux \ + --without-libmd \ + --with-libz \ + --with-liblzma \ + --with-libbz2 + +# todo add this +#--with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ make %{?_smp_mflags} @@ -177,9 +213,9 @@ rm %{buildroot}%{_libdir}/libdpkg.la # fedora has its own implementation rm %{buildroot}%{_bindir}/update-alternatives -rm %{buildroot}%{_mandir}/man8/update-alternatives.8 -rm -rf %{buildroot}%{_mandir}/*/man8/update-alternatives.8 -rm -rf %{buildroot}%{_sysconfdir}/alternatives/ +rm %{buildroot}%{_mandir}/man1/update-alternatives.1 +rm -r %{buildroot}%{_mandir}/*/man1/update-alternatives.1 +rm -r %{buildroot}%{_sysconfdir}/alternatives/ #fedora has own implemenation #FIXME should we remove this ? @@ -216,7 +252,7 @@ create_logfile %files -f dpkg.lang %doc debian/changelog README AUTHORS THANKS TODO -%doc doc/README.feature-removal-schedule debian/usertags debian/dpkg.cron.daily +%doc debian/usertags debian/dpkg.cron.daily %license debian/copyright %dir %{pkgconfdir} %dir %{pkgconfdir}/dpkg.cfg.d @@ -237,7 +273,7 @@ create_logfile %{pkgdatadir}/abitable %{pkgdatadir}/cputable %{pkgdatadir}/ostable -%{pkgdatadir}/triplettable +%{pkgdatadir}/tupletable %dir %{_localstatedir}/lib/dpkg/alternatives %dir %{_localstatedir}/lib/dpkg/info %dir %{_localstatedir}/lib/dpkg/parts @@ -249,8 +285,8 @@ create_logfile %{_mandir}/man1/dpkg-split.1.gz %{_mandir}/man1/dpkg-trigger.1.gz %{_mandir}/man5/dpkg.cfg.5.gz -%{_mandir}/man8/dpkg-divert.8.gz -%{_mandir}/man8/dpkg-statoverride.8.gz +%{_mandir}/man1/dpkg-divert.1.gz +%{_mandir}/man1/dpkg-statoverride.1.gz %{_mandir}/man8/start-stop-daemon.8.gz %{_mandir}/*/man1/dpkg.1.gz %{_mandir}/*/man1/dpkg-deb.1.gz @@ -259,8 +295,8 @@ create_logfile %{_mandir}/*/man1/dpkg-split.1.gz %{_mandir}/*/man1/dpkg-trigger.1.gz %{_mandir}/*/man5/dpkg.cfg.5.gz -%{_mandir}/*/man8/dpkg-divert.8.gz -%{_mandir}/*/man8/dpkg-statoverride.8.gz +%{_mandir}/*/man1/dpkg-divert.1.gz +%{_mandir}/*/man1/dpkg-statoverride.1.gz %{_mandir}/*/man8/start-stop-daemon.8.gz %files devel @@ -269,14 +305,16 @@ create_logfile %{_includedir}/dpkg/*.h %files dev -f dpkg-dev.lang -%doc AUTHORS THANKS debian/usertags doc/README.api doc/README.feature-removal-schedule doc/frontend.txt doc/triggers.txt +%doc AUTHORS THANKS debian/usertags doc/README.api doc/frontend.txt doc/triggers.txt %config(noreplace) %{pkgconfdir}/shlibs.default %config(noreplace) %{pkgconfdir}/shlibs.override + %{_bindir}/dpkg-architecture %{_bindir}/dpkg-buildpackage %{_bindir}/dpkg-buildflags %{_bindir}/dpkg-checkbuilddeps %{_bindir}/dpkg-distaddfile +%{_bindir}/dpkg-genbuildinfo %{_bindir}/dpkg-genchanges %{_bindir}/dpkg-gencontrol %{_bindir}/dpkg-gensymbols @@ -294,6 +332,7 @@ create_logfile %{_mandir}/man1/dpkg-buildpackage.1.gz %{_mandir}/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/man1/dpkg-distaddfile.1.gz +%{_mandir}/man1/dpkg-genbuildinfo.1.gz %{_mandir}/man1/dpkg-genchanges.1.gz %{_mandir}/man1/dpkg-gencontrol.1.gz %{_mandir}/man1/dpkg-gensymbols.1.gz @@ -305,7 +344,12 @@ create_logfile %{_mandir}/man1/dpkg-shlibdeps.1.gz %{_mandir}/man1/dpkg-source.1.gz %{_mandir}/man1/dpkg-vendor.1.gz +%{_mandir}/man5/deb-buildinfo.5.gz +%{_mandir}/man5/deb-changelog.5.gz +%{_mandir}/man5/deb-changes.5.gz %{_mandir}/man5/deb-control.5.gz +%{_mandir}/man5/deb-conffiles.5.gz +%{_mandir}/man5/deb-src-files.5.gz %{_mandir}/man5/deb-extra-override.5.gz %{_mandir}/man5/deb-old.5.gz %{_mandir}/man5/deb-origin.5.gz @@ -315,14 +359,21 @@ create_logfile %{_mandir}/man5/deb-src-control.5.gz %{_mandir}/man5/deb-substvars.5.gz %{_mandir}/man5/deb-symbols.5.gz +%{_mandir}/man5/deb-postinst.5.gz +%{_mandir}/man5/deb-postrm.5.gz +%{_mandir}/man5/deb-preinst.5.gz +%{_mandir}/man5/deb-prerm.5.gz %{_mandir}/man5/deb-triggers.5.gz %{_mandir}/man5/deb-version.5.gz %{_mandir}/man5/deb.5.gz +%{_mandir}/man5/deb822.5.gz +%{_mandir}/man5/dsc.5.gz %{_mandir}/*/man1/dpkg-architecture.1.gz %{_mandir}/*/man1/dpkg-buildpackage.1.gz %{_mandir}/*/man1/dpkg-buildflags.1.gz %{_mandir}/*/man1/dpkg-checkbuilddeps.1.gz %{_mandir}/*/man1/dpkg-distaddfile.1.gz +%{_mandir}/*/man1/dpkg-genbuildinfo.1.gz %{_mandir}/*/man1/dpkg-genchanges.1.gz %{_mandir}/*/man1/dpkg-gencontrol.1.gz %{_mandir}/*/man1/dpkg-gensymbols.1.gz @@ -334,7 +385,12 @@ create_logfile %{_mandir}/*/man1/dpkg-shlibdeps.1.gz %{_mandir}/*/man1/dpkg-source.1.gz %{_mandir}/*/man1/dpkg-vendor.1.gz +%{_mandir}/*/man5/deb-buildinfo.5.gz +%{_mandir}/*/man5/deb-changelog.5.gz +%{_mandir}/*/man5/deb-changes.5.gz %{_mandir}/*/man5/deb-control.5.gz +%{_mandir}/*/man5/deb-conffiles.5.gz +%{_mandir}/*/man5/deb-src-files.5.gz %{_mandir}/*/man5/deb-extra-override.5.gz %{_mandir}/*/man5/deb-old.5.gz %{_mandir}/*/man5/deb-origin.5.gz @@ -344,21 +400,30 @@ create_logfile %{_mandir}/*/man5/deb-src-control.5.gz %{_mandir}/*/man5/deb-substvars.5.gz %{_mandir}/*/man5/deb-symbols.5.gz +%{_mandir}/*/man5/deb-postinst.5.gz +%{_mandir}/*/man5/deb-postrm.5.gz +%{_mandir}/*/man5/deb-preinst.5.gz +%{_mandir}/*/man5/deb-prerm.5.gz %{_mandir}/*/man5/deb-triggers.5.gz %{_mandir}/*/man5/deb-version.5.gz %{_mandir}/*/man5/deb.5.gz +%{_mandir}/*/man5/deb822.5.gz +%{_mandir}/*/man5/dsc.5.gz + %files perl %{perl_vendorlib}/Dpkg* %{_mandir}/man3/Dpkg*.3* -%{_libexecdir}/dpkg/parsechangelog +#{_libexecdir}/dpkg/parsechangelog +%{_datadir}/dpkg/*.specs %files -n dselect -f dselect.lang -%doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt +%doc dselect/methods/multicd/README.multicd %config(noreplace) %{pkgconfdir}/dselect.cfg %{_bindir}/dselect %{perl_vendorlib}/Dselect +%dir %{_libdir}/dpkg %{_libdir}/dpkg/methods %{_mandir}/man1/dselect.1.gz %{_mandir}/*/man1/dselect.1.gz @@ -370,7 +435,8 @@ create_logfile %changelog * Sat Nov 26 2016 Sérgio Basto - 1.18.15-1 -- New major release, 1.18.15 +- New major release, 1.18.15, adaptations based on files of debian directory in + debian package. * Fri Nov 25 2016 Sérgio Basto - 1.17.27-1 - New upstream vesion, 1.17.27, fixes CVE-2015-0860 diff --git a/sources b/sources index 0a351dd..b4401f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e2d761a3c4a9a9e1856337557ec1f9e dpkg_1.17.27.tar.xz +7aa1b61da5bff4cbc5a1d2cb5a30d546 dpkg_1.18.15.tar.xz From 0c768d278b55c8cd571028b9b6f00ff01d41b5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 4 Feb 2017 04:06:24 +0000 Subject: [PATCH 072/102] Update dpkg to 1.18.22 (#1294258) --- .gitignore | 1 + dpkg.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a0620d4..e82e8ec 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.17.25.tar.xz /dpkg_1.17.27.tar.xz /dpkg_1.18.15.tar.xz +/dpkg_1.18.22.tar.xz diff --git a/dpkg.spec b/dpkg.spec index d0a3081..6c6f574 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,7 +2,7 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.18.15 +Version: 1.18.22 Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base @@ -21,7 +21,7 @@ Patch2: dpkg-perl-libexecdir.epel6.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel libtool BuildRequires: doxygen flex xz-devel po4a -%if 0%{?rhel} != 5 && 0%{?rhel} != 6 +%if 0%{?fedora} || 0%{?rhel} > 6 BuildRequires: dotconf-devel %endif # for /usr/bin/perl @@ -144,7 +144,7 @@ Many users find dselect intimidating and new users may prefer to use apt-based u %setup -q #patch0 -p1 %patch1 -p1 -%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%if 0%{?rhel} && 0%{?rhel} < 7 %patch2 -p1 %endif @@ -159,7 +159,7 @@ EOF chmod +x %{__perl_requires} %build -%if 0%{?rhel} != 5 && 0%{?rhel} != 6 +%if 0%{?fedora} || 0%{?rhel} > 6 # We can't run autoreconf on epel <= 6 because needs gettext-0.18 when epel6 # only have gettext-0.17: # autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your configure.ac @@ -434,6 +434,9 @@ create_logfile %changelog +* Sat Feb 04 2017 Sérgio Basto - 1.18.22-1 +- Update dpkg to 1.18.22 (#1294258) + * Sat Nov 26 2016 Sérgio Basto - 1.18.15-1 - New major release, 1.18.15, adaptations based on files of debian directory in debian package. diff --git a/sources b/sources index b4401f8..7497ef2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7aa1b61da5bff4cbc5a1d2cb5a30d546 dpkg_1.18.15.tar.xz +SHA512 (dpkg_1.18.22.tar.xz) = c4653b92d3b3ab3051e1cbe7abb757f75b8ab902a54dcd6e2379115d3f36ae7c5d6e0a00f34a3cec1a96484dc708197061824dd81e465d8627e726bfc48eb2b4 From ca62d64ccafcecf8da3e92f9e5ef5503925ff3c6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 08:34:55 +0000 Subject: [PATCH 073/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 6c6f574..276e56a 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.22 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -434,6 +434,9 @@ create_logfile %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.18.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Sat Feb 04 2017 Sérgio Basto - 1.18.22-1 - Update dpkg to 1.18.22 (#1294258) From 5ee4d09ab2809625c264a092d08a5c147f0bf023 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Sun, 4 Jun 2017 08:53:34 +0200 Subject: [PATCH 074/102] Perl 5.26 rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 276e56a..d9e7606 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.22 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -434,6 +434,9 @@ create_logfile %changelog +* Sun Jun 04 2017 Jitka Plesnikova - 1.18.22-3 +- Perl 5.26 rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 1.18.22-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 30e399646c84db3fc721d40527d2da67c41a1092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 18 Jun 2017 02:44:14 +0100 Subject: [PATCH 075/102] Update dpkg to 1.18.24 --- .gitignore | 1 + dpkg.spec | 19 +++++++++++-------- sources | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index e82e8ec..64b68eb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.17.27.tar.xz /dpkg_1.18.15.tar.xz /dpkg_1.18.22.tar.xz +/dpkg_1.18.24.tar.xz diff --git a/dpkg.spec b/dpkg.spec index d9e7606..708de96 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.18.22 -Release: 3%{?dist} +Version: 1.18.24 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -221,9 +221,9 @@ rm -r %{buildroot}%{_sysconfdir}/alternatives/ #FIXME should we remove this ? rm -rf %{buildroot}%{_sbindir}/install-info -mkdir -p %{buildroot}%{_localstatedir}/lib/dpkg/alternatives %{buildroot}%{_localstatedir}/lib/dpkg/info \ - %{buildroot}%{_localstatedir}/lib/dpkg/parts %{buildroot}%{_localstatedir}/lib/dpkg/updates \ - %{buildroot}%{_localstatedir}/lib/dpkg/methods +#mkdir -p %{buildroot}%{_localstatedir}/lib/dpkg/alternatives %{buildroot}%{_localstatedir}/lib/dpkg/info \ +# %{buildroot}%{_localstatedir}/lib/dpkg/parts %{buildroot}%{_localstatedir}/lib/dpkg/updates \ +# %{buildroot}%{_localstatedir}/lib/dpkg/methods %post @@ -274,6 +274,7 @@ create_logfile %{pkgdatadir}/cputable %{pkgdatadir}/ostable %{pkgdatadir}/tupletable +%dir %{_localstatedir}/lib/dpkg %dir %{_localstatedir}/lib/dpkg/alternatives %dir %{_localstatedir}/lib/dpkg/info %dir %{_localstatedir}/lib/dpkg/parts @@ -423,17 +424,19 @@ create_logfile %config(noreplace) %{pkgconfdir}/dselect.cfg %{_bindir}/dselect %{perl_vendorlib}/Dselect -%dir %{_libdir}/dpkg -%{_libdir}/dpkg/methods +%{_localstatedir}/lib/dpkg/methods +%{_libexecdir}/dpkg/methods %{_mandir}/man1/dselect.1.gz %{_mandir}/*/man1/dselect.1.gz %{_mandir}/man5/dselect.cfg.5.gz %{_mandir}/*/man5/dselect.cfg.5.gz %dir %{pkgconfdir}/dselect.cfg.d -%dir %{_localstatedir}/lib/dpkg/methods %changelog +* Sun Jun 18 2017 Sérgio Basto - 1.18.24-1 +- Update dpkg to 1.18.24 + * Sun Jun 04 2017 Jitka Plesnikova - 1.18.22-3 - Perl 5.26 rebuild diff --git a/sources b/sources index 7497ef2..50dfe94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dpkg_1.18.22.tar.xz) = c4653b92d3b3ab3051e1cbe7abb757f75b8ab902a54dcd6e2379115d3f36ae7c5d6e0a00f34a3cec1a96484dc708197061824dd81e465d8627e726bfc48eb2b4 +SHA512 (dpkg_1.18.24.tar.xz) = 74df36a49a1b6b2243db14bd7ee0b69e50c2f0e79fc87e86e9b3cba2261fb717e421f7190a3ba54b4680a2f83855e5857dcb2625aa56847133258567392f1d42 From 18987584b7ac2f716e472b8e16402b474b5f789f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 18 Jun 2017 02:54:29 +0100 Subject: [PATCH 076/102] add BuildRequires: perl-Time-Piece add also Requires --- dpkg.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 708de96..32fcceb 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -28,6 +28,7 @@ BuildRequires: dotconf-devel BuildRequires: perl BuildRequires: perl-devel BuildRequires: perl-generators +BuildRequires: perl-Time-Piece # for /usr/bin/pod2man %if 0%{?fedora} > 18 BuildRequires: perl-podlators @@ -84,6 +85,7 @@ Group: System Environment/Base Requires: dpkg = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl-TimeDate +Requires: perl-Time-Piece BuildArch: noarch %description perl @@ -415,7 +417,6 @@ create_logfile %files perl %{perl_vendorlib}/Dpkg* %{_mandir}/man3/Dpkg*.3* -#{_libexecdir}/dpkg/parsechangelog %{_datadir}/dpkg/*.specs From fde0ed11cd0a5ed4aba35a516e37e77e901adda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jul 2017 15:17:02 +0200 Subject: [PATCH 077/102] perl dependency renamed to perl-interpreter --- dpkg.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 32fcceb..7b98faf 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -25,7 +25,7 @@ BuildRequires: doxygen flex xz-devel po4a BuildRequires: dotconf-devel %endif # for /usr/bin/perl -BuildRequires: perl +BuildRequires: perl-interpreter BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-Time-Piece From 64ea3dc67ff042615812ddb88b6e46febf96afdc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 06:31:23 +0000 Subject: [PATCH 078/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 7b98faf..bd19eb4 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -435,6 +435,9 @@ create_logfile %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.18.24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sun Jun 18 2017 Sérgio Basto - 1.18.24-1 - Update dpkg to 1.18.24 From 8834d38619da3d2b8e8234bf33cf7edef96c67e4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 19:45:05 +0000 Subject: [PATCH 079/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index bd19eb4..8e4ab70 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -435,6 +435,9 @@ create_logfile %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 1.18.24-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.18.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From c23ecc018ad9101cc46bf3c255fc4a3ebf0422e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 18 Aug 2017 19:31:56 +0100 Subject: [PATCH 080/102] Fix minor rpmlint warnings --- dpkg.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 8e4ab70..9bd08a4 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -139,8 +139,8 @@ Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description -n dselect dselect is a high-level interface for managing the installation and removal of Debian software packages. -. -Many users find dselect intimidating and new users may prefer to use apt-based user interfaces. +Many users find dselect intimidating and new users may prefer to use apt-based +user interfaces. %prep %setup -q @@ -512,7 +512,7 @@ create_logfile * Tue Apr 21 2015 Sérgio Basto - 1.16.16-2 - Some fixes and added support for epel-6 . - Removed Patch0: dpkg-perl-libexecdir.patch . -- move %{_libdir}/dpkg/parsechangelog to archable package . +- move %%{_libdir}/dpkg/parsechangelog to archable package . * Sun Apr 19 2015 Sérgio Basto - 1.16.16-1 - Security update to 1.16.16 From 0d229724d317c6c643fc9da3396785f086264da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 1 Oct 2017 14:05:07 +0100 Subject: [PATCH 081/102] Make the dependency of perl-interpreter conditional --- dpkg.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 9bd08a4..f995fb0 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -25,7 +25,12 @@ BuildRequires: doxygen flex xz-devel po4a BuildRequires: dotconf-devel %endif # for /usr/bin/perl +%if 0%{?rhel} && 0%{?rhel} < 8 +BuildRequires: perl +BuildRequires: perl-version +%else BuildRequires: perl-interpreter +%endif BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-Time-Piece @@ -435,6 +440,10 @@ create_logfile %changelog +* Fri Aug 18 2017 Sérgio Basto - 1.18.24-4 +- Fix minor rpmlint warnings +- Make the dependency of perl-interpreter conditional + * Wed Aug 02 2017 Fedora Release Engineering - 1.18.24-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 23f38f81640d7666fe4216c2db4f5f65616543cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 28 Jan 2018 04:21:30 +0000 Subject: [PATCH 082/102] Fix an issue in epel7 Delete dpkg-perl-libexecdir.patch and other clean ups --- dpkg-perl-libexecdir.patch | 20 -------------------- dpkg.spec | 12 +++++++----- 2 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 dpkg-perl-libexecdir.patch diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch deleted file mode 100644 index dc27f72..0000000 --- a/dpkg-perl-libexecdir.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ./scripts/Makefile.am.orig 2015-04-09 23:09:22.000000000 +0100 -+++ ./scripts/Makefile.am 2015-07-02 02:45:12.844920000 +0100 -@@ -21,7 +21,7 @@ bin_SCRIPTS = \ - dpkg-source \ - dpkg-vendor - --changelogdir = $(pkglibdir)/parsechangelog -+changelogdir = $(pkglibexecdir)/parsechangelog - changelog_SCRIPTS = \ - changelog/debian - -@@ -123,7 +123,7 @@ do_perl_subst = $(AM_V_GEN) \ - sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ - -e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \ - -e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \ -- -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \ -+ -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibexecdir)':" \ - -e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \ - -e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':" - diff --git a/dpkg.spec b/dpkg.spec index f995fb0..7bab17c 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -15,7 +15,6 @@ Group: System Environment/Base License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz -Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel @@ -149,12 +148,10 @@ user interfaces. %prep %setup -q -#patch0 -p1 %patch1 -p1 %if 0%{?rhel} && 0%{?rhel} < 7 %patch2 -p1 %endif - # Filter unwanted Requires: cat << \EOF > %{name}-req #!/bin/sh @@ -165,6 +162,11 @@ EOF %define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req chmod +x %{__perl_requires} +# https://bugzilla.redhat.com/show_bug.cgi?id=1510214 +# crapy /usr/lib/rpm/perl.req in EL7 +# mark string "use --format" as requires perl(--format) +sed -i 's/^use --/may use --/' scripts/dpkg-source.pl + %build %if 0%{?fedora} || 0%{?rhel} > 6 # We can't run autoreconf on epel <= 6 because needs gettext-0.18 when epel6 @@ -184,11 +186,11 @@ autoreconf # todo add this #--with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=%{buildroot} +%make_install mkdir -p %{buildroot}/%{pkgconfdir}/origins From e1f26f7c9891c99d8d9235e3f64b0a78a0bafa98 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 07:15:22 +0000 Subject: [PATCH 083/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 7bab17c..5f29dd4 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -442,6 +442,9 @@ create_logfile %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1.18.24-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Fri Aug 18 2017 Sérgio Basto - 1.18.24-4 - Fix minor rpmlint warnings - Make the dependency of perl-interpreter conditional From c22629b83314b0ba11e56185b24e5b9c99a78690 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 9 Feb 2018 09:04:23 +0100 Subject: [PATCH 084/102] Escape macros in %changelog Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/ Signed-off-by: Igor Gnatenko --- dpkg.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 5f29dd4..0279158 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -442,6 +442,9 @@ create_logfile %changelog +* Fri Feb 09 2018 Igor Gnatenko - 1.18.24-6 +- Escape macros in %%changelog + * Wed Feb 07 2018 Fedora Release Engineering - 1.18.24-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild @@ -556,7 +559,7 @@ create_logfile * Mon Jul 01 2013 Sérgio Basto - 1.16.10-6 - add support to logrotate, by Oron Peled, rhbz #979378 -- added some new %doc and debian/copyright, by Oron Peled, rhbz #979378 +- added some new %%doc and debian/copyright, by Oron Peled, rhbz #979378 - rpmlint cleanups, by Oron Peled, rhbz #979378 * Sun Jun 30 2013 Sérgio Basto - 1.16.10-5 From de92e6f8f99953f328519ad29df8e7d844375f8b Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Fri, 29 Jun 2018 22:08:37 +0200 Subject: [PATCH 085/102] Perl 5.28 rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 0279158..d9ea77d 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -442,6 +442,9 @@ create_logfile %changelog +* Fri Jun 29 2018 Jitka Plesnikova - 1.18.24-7 +- Perl 5.28 rebuild + * Fri Feb 09 2018 Igor Gnatenko - 1.18.24-6 - Escape macros in %%changelog From d4528327e6bd8d88fed697f29364c80802516f03 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 12 Jul 2018 23:06:38 +0000 Subject: [PATCH 086/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index d9ea77d..413f2be 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -442,6 +442,9 @@ create_logfile %changelog +* Thu Jul 12 2018 Fedora Release Engineering - 1.18.24-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Jun 29 2018 Jitka Plesnikova - 1.18.24-7 - Perl 5.28 rebuild From ec2ede67945b10679463388602b1351299e0b9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 14 Jul 2018 15:59:44 +0100 Subject: [PATCH 087/102] https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- dpkg.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dpkg.spec b/dpkg.spec index 413f2be..c97b241 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -17,6 +17,7 @@ URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch +BuildRequires: gcc-c++ BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel libtool BuildRequires: doxygen flex xz-devel po4a @@ -444,6 +445,7 @@ create_logfile %changelog * Thu Jul 12 2018 Fedora Release Engineering - 1.18.24-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild +- https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot * Fri Jun 29 2018 Jitka Plesnikova - 1.18.24-7 - Perl 5.28 rebuild From cb71acb6f44f41a5b6e0de31c69f06421c41a786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 29 Jul 2018 09:48:22 +0100 Subject: [PATCH 088/102] Requires(post): coreutils (#1598872) --- dpkg.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index c97b241..7e4a628 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.24 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -38,6 +38,7 @@ BuildRequires: perl-Time-Piece %if 0%{?fedora} > 18 BuildRequires: perl-podlators %endif +Requires(post): coreutils %description This package provides the low-level infrastructure for handling the @@ -443,6 +444,9 @@ create_logfile %changelog +* Sun Jul 29 2018 Sérgio Basto - 1.18.24-9 +- Requires(post): coreutils (#1598872) + * Thu Jul 12 2018 Fedora Release Engineering - 1.18.24-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot From 47be5fc7e84c98d1380dbb0c34164776e5fc53d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 29 Jul 2018 10:12:35 +0100 Subject: [PATCH 089/102] Can't dpkg on el7 ppc64 --- dpkg.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dpkg.spec b/dpkg.spec index 7e4a628..33cf045 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -40,6 +40,11 @@ BuildRequires: perl-podlators %endif Requires(post): coreutils +#https://bugzilla.redhat.com/show_bug.cgi?id=1497544#c5 +%if 0%{?rhel} +ExcludeArch: ppc64 +%endif + %description This package provides the low-level infrastructure for handling the installation and removal of Debian software packages. From 872504c016c3e682b5acb4164886ae3669e1d30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 29 Jul 2018 11:04:25 +0100 Subject: [PATCH 090/102] Security fix: directory traversal via /DEBIAN symlink --- .gitignore | 1 + dpkg.spec | 10 ++++++++-- sources | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 64b68eb..3a80b9f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.18.15.tar.xz /dpkg_1.18.22.tar.xz /dpkg_1.18.24.tar.xz +/dpkg_1.18.25.tar.xz diff --git a/dpkg.spec b/dpkg.spec index 33cf045..dd4ebf1 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.18.24 -Release: 9%{?dist} +Version: 1.18.25 +Release: 1%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -17,6 +17,7 @@ URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch + BuildRequires: gcc-c++ BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel libtool @@ -159,6 +160,7 @@ user interfaces. %if 0%{?rhel} && 0%{?rhel} < 7 %patch2 -p1 %endif + # Filter unwanted Requires: cat << \EOF > %{name}-req #!/bin/sh @@ -449,6 +451,10 @@ create_logfile %changelog +* Sun Jul 29 2018 Sérgio Basto - 1.18.25-1 +- Update dpkg to 1.18.25 +- Security fix: directory traversal via /DEBIAN symlink + * Sun Jul 29 2018 Sérgio Basto - 1.18.24-9 - Requires(post): coreutils (#1598872) diff --git a/sources b/sources index 50dfe94..4870415 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dpkg_1.18.24.tar.xz) = 74df36a49a1b6b2243db14bd7ee0b69e50c2f0e79fc87e86e9b3cba2261fb717e421f7190a3ba54b4680a2f83855e5857dcb2625aa56847133258567392f1d42 +SHA512 (dpkg_1.18.25.tar.xz) = a26907c32ea02044d8729b70996b786204d3ce89ac294a8422b009688ab9bf886f593cb37430e84593dec2c26cfbc01a458d47fbda749decdf8acbfb72e07bb3 From f81302ef37d3dd437b8eda86445dec1b67befdc9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 31 Jul 2018 10:57:56 +0200 Subject: [PATCH 091/102] Rebuild with fixed binutils --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index dd4ebf1..c40099e 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.25 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -451,6 +451,9 @@ create_logfile %changelog +* Tue Jul 31 2018 Florian Weimer - 1.18.25-2 +- Rebuild with fixed binutils + * Sun Jul 29 2018 Sérgio Basto - 1.18.25-1 - Update dpkg to 1.18.25 - Security fix: directory traversal via /DEBIAN symlink From 7236b94618b36b8f3127837debf09374f76c3e0c Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Sun, 9 Sep 2018 00:59:11 +0800 Subject: [PATCH 092/102] Bundle a version of tar to make it compatible in EL7 (BZ#1626465) --- .gitignore | 1 + dpkg.spec | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- sources | 1 + 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3a80b9f..b0f0a34 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.18.22.tar.xz /dpkg_1.18.24.tar.xz /dpkg_1.18.25.tar.xz +/tar-1.30.tar.xz diff --git a/dpkg.spec b/dpkg.spec index c40099e..d975878 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,9 +1,17 @@ %global pkgconfdir %{_sysconfdir}/dpkg %global pkgdatadir %{_datadir}/dpkg +%global tar_version 1.30 +%if 0%{?rhel} && 0%{?rhel} < 8 +# This version of dpkg requires tar >= 1.28, but the current version that available in +# el7 is 1.26. So we have to bundle a build of a newer version. +%global bundle_tar 1 +%else +%global bundle_tar 0 +%endif Name: dpkg Version: 1.18.25 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -17,11 +25,14 @@ URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch +Source1: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{tar_version}.tar.xz BuildRequires: gcc-c++ BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel libtool -BuildRequires: doxygen flex xz-devel po4a +BuildRequires: doxygen flex xz-devel +BuildRequires: po4a >= 0.43 +BuildRequires: perl(Digest) %if 0%{?fedora} || 0%{?rhel} > 6 BuildRequires: dotconf-devel %endif @@ -39,6 +50,15 @@ BuildRequires: perl-Time-Piece %if 0%{?fedora} > 18 BuildRequires: perl-podlators %endif +%if %bundle_tar +BuildRequires: libacl-devel +Provides: bundled(tar) = %{tar_version} +Provides: bundled(gnulib) +%else +# Needed for --clamp-mtime in dpkg-source -b. +Requires: tar >= 2:1.28 +%endif + Requires(post): coreutils #https://bugzilla.redhat.com/show_bug.cgi?id=1497544#c5 @@ -176,7 +196,24 @@ chmod +x %{__perl_requires} # mark string "use --format" as requires perl(--format) sed -i 's/^use --/may use --/' scripts/dpkg-source.pl +%if %bundle_tar +tar Jfx %{SOURCE1} +%endif + %build +%if %bundle_tar +pushd tar-%{tar_version} +autoreconf -v +# follow config options of standard tar except NLS +%configure \ + %{!?with_selinux:--without-selinux} \ + --with-lzma="xz --format=lzma" \ + --disable-nls \ + DEFAULT_RMT_DIR=%{_sysconfdir} \ + RSH=/usr/bin/ssh +%make_build +popd +%endif %if 0%{?fedora} || 0%{?rhel} > 6 # We can't run autoreconf on epel <= 6 because needs gettext-0.18 when epel6 # only have gettext-0.17: @@ -193,12 +230,21 @@ autoreconf --with-liblzma \ --with-libbz2 +%if %bundle_tar +echo '#define TAR "%{_libexecdir}/%{name}/tar"' > override_tar.h +echo '#include "override_tar.h"' >> config.h.in +%endif # todo add this #--with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ %make_build %install +%if %bundle_tar +pushd tar-%{tar_version} +install -m 755 -D src/tar %{buildroot}/%{_libexecdir}/%{name}/tar +popd +%endif %make_install mkdir -p %{buildroot}/%{pkgconfdir}/origins @@ -287,6 +333,10 @@ create_logfile %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride %{_sbindir}/start-stop-daemon +%dir %{_libexecdir}/%{name} +%if %bundle_tar +%{_libexecdir}/%{name}/tar +%endif %dir %{pkgdatadir} %{pkgdatadir}/abitable %{pkgdatadir}/cputable @@ -451,6 +501,9 @@ create_logfile %changelog +* Sat Sep 8 2018 Robin Lee - 1.18.25-3 +- Bundle a version of tar to make it compatible in EL7 (BZ#1626465) + * Tue Jul 31 2018 Florian Weimer - 1.18.25-2 - Rebuild with fixed binutils diff --git a/sources b/sources index 4870415..e7fceb0 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (dpkg_1.18.25.tar.xz) = a26907c32ea02044d8729b70996b786204d3ce89ac294a8422b009688ab9bf886f593cb37430e84593dec2c26cfbc01a458d47fbda749decdf8acbfb72e07bb3 +SHA512 (tar-1.30.tar.xz) = 9c8b2cacf8f6ca1b19f788d4ec0410127c4d71e54b9c9cac99ee5af6c002189ccc521302955510bb22a54a069ffd00fc2de12ac776985cbbeb3f1ecf38a4f8d9 From dfec5e764e81f18671a1eaaea8371e091a4df3ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 16 Sep 2018 17:12:50 +0100 Subject: [PATCH 093/102] Fix conflicts with man pages on el --- dpkg.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index d975878..b83f468 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -11,7 +11,7 @@ Name: dpkg Version: 1.18.25 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -289,6 +289,14 @@ rm -rf %{buildroot}%{_sbindir}/install-info # %{buildroot}%{_localstatedir}/lib/dpkg/parts %{buildroot}%{_localstatedir}/lib/dpkg/updates \ # %{buildroot}%{_localstatedir}/lib/dpkg/methods +%if 0%{?rhel} +# https://www.spinics.net/linux/fedora/epel-devel/msg02029.html +# avoid conflicts files with man-pages (who cares about it and pl man pages ?) +rm -rf %{buildroot}%{_mandir}/it/man1/ +rm -rf %{buildroot}%{_mandir}/it/man5/ +rm -rf %{buildroot}%{_mandir}/pl/man1/ +%endif + %post # from dpkg.postinst @@ -501,6 +509,9 @@ create_logfile %changelog +* Sun Sep 16 2018 Sérgio Basto - 1.18.25-4 +- Fix conflicts with man pages on el + * Sat Sep 8 2018 Robin Lee - 1.18.25-3 - Bundle a version of tar to make it compatible in EL7 (BZ#1626465) From 69e1864c9e16a30663d11b29c5e8a5d495608533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 23 Sep 2018 06:42:42 +0100 Subject: [PATCH 094/102] Revert "Bundle a version of tar to make it compatible in EL7" Keep BR: perl(Digest) --- .gitignore | 1 - dpkg.spec | 55 +++++++----------------------------------------------- sources | 1 - 3 files changed, 7 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index b0f0a34..3a80b9f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,3 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.18.22.tar.xz /dpkg_1.18.24.tar.xz /dpkg_1.18.25.tar.xz -/tar-1.30.tar.xz diff --git a/dpkg.spec b/dpkg.spec index b83f468..888749b 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -1,17 +1,9 @@ %global pkgconfdir %{_sysconfdir}/dpkg %global pkgdatadir %{_datadir}/dpkg -%global tar_version 1.30 -%if 0%{?rhel} && 0%{?rhel} < 8 -# This version of dpkg requires tar >= 1.28, but the current version that available in -# el7 is 1.26. So we have to bundle a build of a newer version. -%global bundle_tar 1 -%else -%global bundle_tar 0 -%endif Name: dpkg Version: 1.18.25 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -25,14 +17,12 @@ URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch -Source1: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{tar_version}.tar.xz BuildRequires: gcc-c++ BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: autoconf automake gettext-devel libtool BuildRequires: doxygen flex xz-devel BuildRequires: po4a >= 0.43 -BuildRequires: perl(Digest) %if 0%{?fedora} || 0%{?rhel} > 6 BuildRequires: dotconf-devel %endif @@ -46,18 +36,13 @@ BuildRequires: perl-interpreter BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-Time-Piece +BuildRequires: perl(Digest) # for /usr/bin/pod2man %if 0%{?fedora} > 18 BuildRequires: perl-podlators %endif -%if %bundle_tar -BuildRequires: libacl-devel -Provides: bundled(tar) = %{tar_version} -Provides: bundled(gnulib) -%else # Needed for --clamp-mtime in dpkg-source -b. -Requires: tar >= 2:1.28 -%endif +#Requires: tar >= 2:1.28 Requires(post): coreutils @@ -196,24 +181,7 @@ chmod +x %{__perl_requires} # mark string "use --format" as requires perl(--format) sed -i 's/^use --/may use --/' scripts/dpkg-source.pl -%if %bundle_tar -tar Jfx %{SOURCE1} -%endif - %build -%if %bundle_tar -pushd tar-%{tar_version} -autoreconf -v -# follow config options of standard tar except NLS -%configure \ - %{!?with_selinux:--without-selinux} \ - --with-lzma="xz --format=lzma" \ - --disable-nls \ - DEFAULT_RMT_DIR=%{_sysconfdir} \ - RSH=/usr/bin/ssh -%make_build -popd -%endif %if 0%{?fedora} || 0%{?rhel} > 6 # We can't run autoreconf on epel <= 6 because needs gettext-0.18 when epel6 # only have gettext-0.17: @@ -230,21 +198,12 @@ autoreconf --with-liblzma \ --with-libbz2 -%if %bundle_tar -echo '#define TAR "%{_libexecdir}/%{name}/tar"' > override_tar.h -echo '#include "override_tar.h"' >> config.h.in -%endif # todo add this #--with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ %make_build %install -%if %bundle_tar -pushd tar-%{tar_version} -install -m 755 -D src/tar %{buildroot}/%{_libexecdir}/%{name}/tar -popd -%endif %make_install mkdir -p %{buildroot}/%{pkgconfdir}/origins @@ -341,10 +300,6 @@ create_logfile %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride %{_sbindir}/start-stop-daemon -%dir %{_libexecdir}/%{name} -%if %bundle_tar -%{_libexecdir}/%{name}/tar -%endif %dir %{pkgdatadir} %{pkgdatadir}/abitable %{pkgdatadir}/cputable @@ -509,6 +464,10 @@ create_logfile %changelog +* Sun Sep 23 2018 Sérgio Basto - 1.18.25-5 +- Revert "Bundle a version of tar to make it compatible in EL7" +- Keep BR: perl(Digest) + * Sun Sep 16 2018 Sérgio Basto - 1.18.25-4 - Fix conflicts with man pages on el diff --git a/sources b/sources index e7fceb0..4870415 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ SHA512 (dpkg_1.18.25.tar.xz) = a26907c32ea02044d8729b70996b786204d3ce89ac294a8422b009688ab9bf886f593cb37430e84593dec2c26cfbc01a458d47fbda749decdf8acbfb72e07bb3 -SHA512 (tar-1.30.tar.xz) = 9c8b2cacf8f6ca1b19f788d4ec0410127c4d71e54b9c9cac99ee5af6c002189ccc521302955510bb22a54a069ffd00fc2de12ac776985cbbeb3f1ecf38a4f8d9 From c1c4ce5ada8177848d955dcf3b7e4da8d3d0ab6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 23 Sep 2018 14:59:33 +0100 Subject: [PATCH 095/102] Remove --clamp-mtime option on tar of el7. --- dpkg-clamp-mtime.patch | 29 +++++++++++++++++++++++++++++ dpkg.spec | 6 ++++++ 2 files changed, 35 insertions(+) create mode 100644 dpkg-clamp-mtime.patch diff --git a/dpkg-clamp-mtime.patch b/dpkg-clamp-mtime.patch new file mode 100644 index 0000000..c9c37b1 --- /dev/null +++ b/dpkg-clamp-mtime.patch @@ -0,0 +1,29 @@ +clamp-mtime only available in tar 1.28 but we may distar it in epel7 + + +man tar + --clamp-mtime + Only set time when the file is more recent than what was given with --mtime. + +--- ./scripts/Dpkg/Source/Archive.pm.orig 2018-09-23 14:50:58.650262327 +0100 ++++ ./scripts/Dpkg/Source/Archive.pm 2018-09-23 14:51:10.640395035 +0100 +@@ -52,7 +52,7 @@ sub create { + # Call tar creation process + $spawn_opts{delete_env} = [ 'TAR_OPTIONS' ]; + $spawn_opts{exec} = [ $Dpkg::PROGTAR, '-cf', '-', '--format=gnu', '--sort=name', +- '--mtime', "\@$mtime", '--clamp-mtime', '--null', ++ '--mtime', "\@$mtime", '--null', + '--numeric-owner', '--owner=0', '--group=0', + @{$opts{options}}, '-T', '-' ]; + *$self->{pid} = spawn(%spawn_opts); +--- ./dpkg-deb/build.c.orig 2018-09-23 14:50:06.952690066 +0100 ++++ ./dpkg-deb/build.c 2018-09-23 14:50:22.771865176 +0100 +@@ -450,7 +450,7 @@ tarball_pack(const char *dir, filenames_ + + command_init(&cmd, TAR, "tar -cf"); + command_add_args(&cmd, "tar", "-cf", "-", "--format=gnu", +- "--mtime", mtime, "--clamp-mtime", NULL); ++ "--mtime", mtime, NULL); + /* Mode might become a positional argument, pass it before -T. */ + if (mode) + command_add_args(&cmd, "--mode", mode, NULL); diff --git a/dpkg.spec b/dpkg.spec index 888749b..d45ca40 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -17,6 +17,7 @@ URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch +Patch3: dpkg-clamp-mtime.patch BuildRequires: gcc-c++ BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel @@ -165,6 +166,10 @@ user interfaces. %if 0%{?rhel} && 0%{?rhel} < 7 %patch2 -p1 %endif +%if 0%{?rhel} && 0%{?rhel} < 8 +%patch3 -p1 +%endif + # Filter unwanted Requires: cat << \EOF > %{name}-req @@ -467,6 +472,7 @@ create_logfile * Sun Sep 23 2018 Sérgio Basto - 1.18.25-5 - Revert "Bundle a version of tar to make it compatible in EL7" - Keep BR: perl(Digest) +- Remove --clamp-mtime option on tar of el7. * Sun Sep 16 2018 Sérgio Basto - 1.18.25-4 - Fix conflicts with man pages on el From 90f4752a32538b59d5c60d25239f4259e175e9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 23 Sep 2018 15:14:08 +0100 Subject: [PATCH 096/102] Add Requires perl(Digest::MD5) and perl(Digest::SHA*) on dpkg-perl (#1628409) --- dpkg.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dpkg.spec b/dpkg.spec index d45ca40..5683ad8 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -104,6 +104,10 @@ Requires: dpkg = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl-TimeDate Requires: perl-Time-Piece +Requires: perl(Digest::MD5) +Requires: perl(Digest::SHA) +Requires: perl(Digest::SHA1) +Requires: perl(Digest::SHA3) BuildArch: noarch %description perl @@ -473,6 +477,7 @@ create_logfile - Revert "Bundle a version of tar to make it compatible in EL7" - Keep BR: perl(Digest) - Remove --clamp-mtime option on tar of el7. +- Add Requires perl(Digest::MD5) and perl(Digest::SHA*) on dpkg-perl (#1628409) * Sun Sep 16 2018 Sérgio Basto - 1.18.25-4 - Fix conflicts with man pages on el From 67e96add9beeeae04bdced55b69bc440eaecebfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 23 Jan 2019 02:03:10 +0000 Subject: [PATCH 097/102] po4a is now available on ppc64 and we can build dpkg there --- dpkg.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 5683ad8..07313da 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.25 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Package maintenance system for Debian Linux Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following @@ -47,10 +47,6 @@ BuildRequires: perl-podlators Requires(post): coreutils -#https://bugzilla.redhat.com/show_bug.cgi?id=1497544#c5 -%if 0%{?rhel} -ExcludeArch: ppc64 -%endif %description This package provides the low-level infrastructure for handling the @@ -473,6 +469,9 @@ create_logfile %changelog +* Wed Jan 23 2019 Sérgio Basto - 1.18.25-6 +- po4a is now available on ppc64 and we can build dpkg there + * Sun Sep 23 2018 Sérgio Basto - 1.18.25-5 - Revert "Bundle a version of tar to make it compatible in EL7" - Keep BR: perl(Digest) From 3d2155306695a336e1c64cf569bf3106e4ab7c24 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:42 +0100 Subject: [PATCH 098/102] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- dpkg.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 07313da..244e7c6 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -5,7 +5,6 @@ Name: dpkg Version: 1.18.25 Release: 6%{?dist} Summary: Package maintenance system for Debian Linux -Group: System Environment/Base # The entire source code is GPLv2+ with exception of the following # lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain # lib/dpkg/showpkg.c, dselect/methods/multicd, lib/dpkg/utils.c, lib/dpkg/showpkg.c - GPLv2 @@ -67,7 +66,6 @@ because packages dependencies will likely be unmet. %package devel Summary: Debian package management static library -Group: Development/System Provides: dpkg-static = %{version}-%{release} %description devel @@ -80,7 +78,6 @@ at any time, use at your own risk. %package dev Summary: Debian package development tools -Group: Development/System Requires: dpkg-perl = %{version}-%{release} Requires: patch, make, binutils, bzip2, lzma, xz Obsoletes: dpkg-devel < 1.16 @@ -95,7 +92,6 @@ for example, most packages need make and the C compiler gcc. %package perl Summary: Dpkg perl modules -Group: System Environment/Base Requires: dpkg = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl-TimeDate @@ -150,7 +146,6 @@ modules. %package -n dselect Summary: Debian package management front-end -Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) From 9c69f22389cffad3cfd127b030f3c2ba6e2b573e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 17:33:12 +0000 Subject: [PATCH 099/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 244e7c6..269e379 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.25 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Package maintenance system for Debian Linux # The entire source code is GPLv2+ with exception of the following # lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain @@ -464,6 +464,9 @@ create_logfile %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 1.18.25-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Jan 23 2019 Sérgio Basto - 1.18.25-6 - po4a is now available on ppc64 and we can build dpkg there From 62a09e09e8902f1ed4f027b544f3e02d707a5668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Thu, 28 Feb 2019 05:46:33 +0000 Subject: [PATCH 100/102] Requires perl(MIME::Lite) on dpkg-dev (rhbz #1678637) Adds check section and performs unit tests but ignores failures --- dpkg.spec | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dpkg.spec b/dpkg.spec index 269e379..0e54885 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.25 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Package maintenance system for Debian Linux # The entire source code is GPLv2+ with exception of the following # lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain @@ -43,6 +43,12 @@ BuildRequires: perl-podlators %endif # Needed for --clamp-mtime in dpkg-source -b. #Requires: tar >= 2:1.28 +# Need by make check +BuildRequires: perl(Test::More) +BuildRequires: perl(IPC::Cmd) +BuildRequires: perl(Digest::SHA) +BuildRequires: perl(IO::String) +BuildRequires: fakeroot Requires(post): coreutils @@ -79,7 +85,13 @@ at any time, use at your own risk. %package dev Summary: Debian package development tools Requires: dpkg-perl = %{version}-%{release} -Requires: patch, make, binutils, bzip2, lzma, xz +Requires: patch +Requires: make +Requires: binutils +Requires: bzip2 +Requires: lzma +Requires: xz +Requires: perl(MIME::Lite) Obsoletes: dpkg-devel < 1.16 BuildArch: noarch @@ -256,6 +268,10 @@ rm -rf %{buildroot}%{_mandir}/it/man5/ rm -rf %{buildroot}%{_mandir}/pl/man1/ %endif +%check +make VERBOSE=1 TESTSUITEFLAGS=--verbose \ + TEST_PARALLEL=4 check || : + %post # from dpkg.postinst @@ -464,6 +480,10 @@ create_logfile %changelog +* Thu Feb 28 2019 Sérgio Basto - 1.18.25-8 +- Requires perl(MIME::Lite) on dpkg-dev (rhbz #1678637) +- Adds check section and performs unit tests but ignores failures + * Thu Jan 31 2019 Fedora Release Engineering - 1.18.25-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 7d379832c00e47028e2f5fa533804090d83cf282 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Sun, 2 Jun 2019 00:21:51 +0200 Subject: [PATCH 101/102] Perl 5.30 rebuild --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 0e54885..46c6469 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.25 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Package maintenance system for Debian Linux # The entire source code is GPLv2+ with exception of the following # lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain @@ -480,6 +480,9 @@ create_logfile %changelog +* Sat Jun 01 2019 Jitka Plesnikova - 1.18.25-9 +- Perl 5.30 rebuild + * Thu Feb 28 2019 Sérgio Basto - 1.18.25-8 - Requires perl(MIME::Lite) on dpkg-dev (rhbz #1678637) - Adds check section and performs unit tests but ignores failures From a5845d34bef1a02e4a7a19b7d4cfc9f644fd8a32 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 22:20:23 +0000 Subject: [PATCH 102/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dpkg.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpkg.spec b/dpkg.spec index 46c6469..e552512 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -3,7 +3,7 @@ Name: dpkg Version: 1.18.25 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Package maintenance system for Debian Linux # The entire source code is GPLv2+ with exception of the following # lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain @@ -480,6 +480,9 @@ create_logfile %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 1.18.25-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Jun 01 2019 Jitka Plesnikova - 1.18.25-9 - Perl 5.30 rebuild