From 369bdc7e78569fdc3771dcf2ad232eeb4d46914c Mon Sep 17 00:00:00 2001 From: topdog Date: Sat, 20 Feb 2010 06:01:41 +0000 Subject: [PATCH 01/34] - 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 63be29fb2f12d1cc2d18f2ca755e6847a69d8066 Mon Sep 17 00:00:00 2001 From: topdog Date: Thu, 11 Mar 2010 13:43:39 +0000 Subject: [PATCH 02/34] - 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 991f106faf44c9fc8c90e44ea93687fdc842b333 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 13:14:01 +0000 Subject: [PATCH 03/34] 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 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 04/34] 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 05/34] 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 06/34] 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 07/34] - 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 e9277aefd0aba42ba982c6521173fb3636a69824 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 18:59:24 -0600 Subject: [PATCH 08/34] - 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 09/34] - 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 10/34] - 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 11/34] 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 13/34] 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 14/34] 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 15/34] 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 16/34] 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 17/34] 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 18/34] 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 19/34] 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 20/34] 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 21/34] 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 22/34] 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 23/34] 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 24/34] - 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 25/34] 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 26/34] 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 27/34] - 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 28/34] 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 29/34] 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 30/34] - 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 31/34] 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 32/34] 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 33/34] 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 34/34] 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