From b0e4cef696572d3fae4fd3a9fc14db4aa768fcec Mon Sep 17 00:00:00 2001 From: Sérgio M. Basto Date: Nov 25 2016 19:19:53 +0000 Subject: cant upgrade to 1.17.x due selinux support. --- diff --git a/.gitignore b/.gitignore index a9db886..46d6960 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,3 @@ dpkg_1.15.5.6.tar.bz2 /dpkg_1.16.14.tar.xz /dpkg_1.16.15.tar.xz /dpkg_1.16.16.tar.xz -/dpkg_1.17.25.tar.xz -/dpkg_1.17.27.tar.xz diff --git a/dpkg-perl-libexecdir.epel6.patch b/dpkg-perl-libexecdir.epel6.patch index 4327d42..b430247 100644 --- a/dpkg-perl-libexecdir.epel6.patch +++ b/dpkg-perl-libexecdir.epel6.patch @@ -1,6 +1,6 @@ ---- ./scripts/Makefile.in.orig 2015-04-10 01:37:03.000000000 +0100 -+++ ./scripts/Makefile.in 2015-07-02 04:16:51.404577510 +0100 -@@ -415,7 +415,7 @@ bin_SCRIPTS = \ +--- dpkg-1.16.16.epel6/scripts/Makefile.in 2015-04-09 07:47:16.000000000 +0100 ++++ dpkg-1.16.16/scripts/Makefile.in 2015-04-26 01:35:34.275309326 +0100 +@@ -338,7 +392,7 @@ bin_SCRIPTS = \ dpkg-source \ dpkg-vendor @@ -9,12 +9,12 @@ changelog_SCRIPTS = \ changelog/debian -@@ -516,7 +516,7 @@ do_perl_subst = $(AM_V_GEN) \ +@@ -431,7 +485,7 @@ nobase_dist_perllib_DATA = \ + man3_MANS = + do_perl_subst = $(AM_V_GEN) \ sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ - -e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \ - -e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \ -- -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \ -+ -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibexecdir)':" \ - -e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \ - -e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':" - +- -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \ ++ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibexecdir)\":" \ + -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \ + -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ + -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch index dc27f72..8a8fbff 100644 --- a/dpkg-perl-libexecdir.patch +++ b/dpkg-perl-libexecdir.patch @@ -1,5 +1,6 @@ ---- ./scripts/Makefile.am.orig 2015-04-09 23:09:22.000000000 +0100 -+++ ./scripts/Makefile.am 2015-07-02 02:45:12.844920000 +0100 +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 @@ -9,12 +10,12 @@ changelog_SCRIPTS = \ changelog/debian -@@ -123,7 +123,7 @@ do_perl_subst = $(AM_V_GEN) \ - sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ - -e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \ - -e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \ -- -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \ -+ -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibexecdir)':" \ - -e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \ - -e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':" +@@ -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.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 index 632350a..4116480 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -2,8 +2,8 @@ %global pkgdatadir %{_datadir}/dpkg Name: dpkg -Version: 1.17.27 -Release: 1%{?dist} +Version: 1.16.16 +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 @@ -19,17 +19,16 @@ Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel -BuildRequires: autoconf automake gettext-devel libtool +BuildRequires: autoconf automake gettext-devel BuildRequires: doxygen flex xz-devel po4a %if 0%{?rhel} != 5 && 0%{?rhel} != 6 BuildRequires: dotconf-devel %endif -# for /usr/bin/perl -BuildRequires: perl -BuildRequires: perl-generators # for /usr/bin/pod2man %if 0%{?fedora} > 18 BuildRequires: perl-podlators +%else +BuildRequires: perl %endif %description @@ -74,7 +73,6 @@ Required to unpack, build and upload Debian source packages Summary: Dpkg perl modules Group: System Environment/Base Requires: dpkg = %{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl, perl-TimeDate BuildArch: noarch @@ -103,7 +101,6 @@ there are the following modules: Summary: Debian package management front-end Group: System Environment/Base Requires: %{name} = %{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description -n dselect dselect is a high-level interface for the installation/removal of debs . @@ -112,7 +109,7 @@ dselect is a high-level interface for the installation/removal of debs . %setup -q %patch0 -p1 %patch1 -p1 -%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%if 0%{?rhel} <= 6 %patch2 -p1 %endif @@ -133,9 +130,10 @@ chmod +x %{__perl_requires} # autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your configure.ac # file requires the infrastructure from gettext-0.18 but this version # is older. Please upgrade to gettext-0.18 or newer. -autoreconf +autoreconf -fiv %endif -%configure --disable-linker-optimisations \ +%configure --disable-start-stop-daemon \ + --disable-linker-optimisations \ --with-admindir=%{_localstatedir}/lib/dpkg \ --with-selinux \ --with-zlib \ @@ -147,6 +145,8 @@ make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} +mkdir -p %{buildroot}/%{pkgconfdir}/dpkg.cfg.d +mkdir -p %{buildroot}/%{pkgconfdir}/dselect.cfg.d mkdir -p %{buildroot}/%{pkgconfdir}/origins # Prepare "vendor" files for dpkg-vendor @@ -160,8 +160,8 @@ ln -sf fedora %{buildroot}/%{pkgconfdir}/origins/default %endif # from debian/dpkg.install +install -pm0644 debian/archtable %{buildroot}/%{pkgdatadir}/archtable install -pm0644 debian/dpkg.cfg %{buildroot}/%{pkgconfdir} -install -pm0644 debian/dselect.cfg %{buildroot}/%{pkgconfdir} install -pm0644 debian/shlibs.default %{buildroot}/%{pkgconfdir} install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir} @@ -169,12 +169,11 @@ install -pm0644 debian/shlibs.override %{buildroot}/%{pkgconfdir} mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} + %find_lang dpkg %find_lang dpkg-dev %find_lang dselect -rm %{buildroot}%{_libdir}/libdpkg.la - # fedora has its own implementation rm %{buildroot}%{_bindir}/update-alternatives rm %{buildroot}%{_mandir}/man8/update-alternatives.8 @@ -214,10 +213,11 @@ create_database create_logfile -%files -f dpkg.lang +%files -f dpkg.lang +%defattr(-,root,root,-) %doc debian/changelog README AUTHORS THANKS TODO -%doc doc/README.feature-removal-schedule debian/usertags debian/dpkg.cron.daily -%license debian/copyright +%doc debian/copyright debian/usertags +%doc doc/README.feature-removal-schedule doc/triggers.txt %dir %{pkgconfdir} %dir %{pkgconfdir}/dpkg.cfg.d %dir %{pkgconfdir}/origins @@ -232,9 +232,9 @@ create_logfile %{_bindir}/dpkg-trigger %{_bindir}/dpkg-divert %{_bindir}/dpkg-statoverride -%{_sbindir}/start-stop-daemon %dir %{pkgdatadir} %{pkgdatadir}/abitable +%{pkgdatadir}/archtable %{pkgdatadir}/cputable %{pkgdatadir}/ostable %{pkgdatadir}/triplettable @@ -251,7 +251,6 @@ create_logfile %{_mandir}/man5/dpkg.cfg.5.gz %{_mandir}/man8/dpkg-divert.8.gz %{_mandir}/man8/dpkg-statoverride.8.gz -%{_mandir}/man8/start-stop-daemon.8.gz %{_mandir}/*/man1/dpkg.1.gz %{_mandir}/*/man1/dpkg-deb.1.gz %{_mandir}/*/man1/dpkg-maintscript-helper.1.gz @@ -261,15 +260,16 @@ create_logfile %{_mandir}/*/man5/dpkg.cfg.5.gz %{_mandir}/*/man8/dpkg-divert.8.gz %{_mandir}/*/man8/dpkg-statoverride.8.gz -%{_mandir}/*/man8/start-stop-daemon.8.gz %files devel +%defattr(-,root,root,-) %{_libdir}/libdpkg.a %{_libdir}/pkgconfig/libdpkg.pc %{_includedir}/dpkg/*.h -%files dev -f dpkg-dev.lang -%doc AUTHORS THANKS debian/usertags doc/README.api doc/README.feature-removal-schedule doc/frontend.txt doc/triggers.txt +%files dev +%defattr(-,root,root,-) +%doc doc/README.api doc/coding-style.txt doc/frontend.txt %config(noreplace) %{pkgconfdir}/shlibs.default %config(noreplace) %{pkgconfdir}/shlibs.override %{_bindir}/dpkg-architecture @@ -288,6 +288,7 @@ create_logfile %{_bindir}/dpkg-shlibdeps %{_bindir}/dpkg-source %{_bindir}/dpkg-vendor +%{_libexecdir}/dpkg/parsechangelog %{pkgdatadir}/*.mk %{_mandir}/man1/dpkg-architecture.1.gz %{_mandir}/man1/dpkg-buildflags.1.gz @@ -348,65 +349,26 @@ create_logfile %{_mandir}/*/man5/deb-version.5.gz %{_mandir}/*/man5/deb.5.gz -%files perl +%files perl -f dpkg-dev.lang +%defattr(-,root,root,-) %{perl_vendorlib}/Dpkg* %{_mandir}/man3/Dpkg*.3* -%{_libexecdir}/dpkg/parsechangelog - %files -n dselect -f dselect.lang +%defattr(-,root,root,-) %doc dselect/methods/multicd/README.multicd dselect/methods/ftp/README.mirrors.txt -%config(noreplace) %{pkgconfdir}/dselect.cfg %{_bindir}/dselect -%{perl_vendorlib}/Dselect +%{perl_vendorlib}/Debian %{_libdir}/dpkg/methods %{_mandir}/man1/dselect.1.gz %{_mandir}/*/man1/dselect.1.gz %{_mandir}/man5/dselect.cfg.5.gz %{_mandir}/*/man5/dselect.cfg.5.gz %dir %{pkgconfdir}/dselect.cfg.d -%dir %{_localstatedir}/lib/dpkg/methods +%{_localstatedir}/lib/dpkg/methods %changelog -* Fri Nov 25 2016 Sérgio Basto - 1.17.27-1 -- New upstream vesion, 1.17.27, fixes CVE-2015-0860 -- Add start-stop-daemon because could be useful: https://github.com/gammu/gammu/issues/75 (RH - system not support start-stop-daemon) -- Drop dpkg-tar-invocation.patch it is already is sources. - -* Tue May 17 2016 Jitka Plesnikova - 1.17.25-8 -- Perl 5.24 rebuild - -* Wed Feb 03 2016 Fedora Release Engineering - 1.17.25-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sat Oct 17 2015 Sérgio Basto - 1.17.25-6 -- Following debian/libdpkg-perl.install _libexecdir/dpkg/parsechangelog moved - into dpkg-perl. -- Removed duplicated entries of _datadir/dpkg/*.mk in %%files, following - debian/dpkg-dev.install now only in dpkg-dev. - -* Sat Oct 17 2015 Sérgio Basto - 1.17.25-5 -- Fix rhbz #1271133 -- Spec cleanups. - -* Wed Jul 22 2015 Petr Pisar - 1.17.25-4 -- Require perl(:MODULE_COMPAT_) symbol by packages that provide Perl modules - -* Fri Jul 10 2015 Sérgio Basto - 1.17.25-3 -- call 'tar --no-recursion -T -' and not 'tar -T - --no-recursion' (#1241508) - -* Thu Jul 02 2015 Sérgio Basto - 1.17.25-1 -- Update to 1.17.25 (Debian stable), adjustments following files - dpkg-1.17.25/debian/*.install, *.postinst, etc. -- Rebased dpkg-perl-libexecdir.patch and dpkg-perl-libexecdir.epel6.patch -- Removed old defattr tags. -- Added License tag. - -* Wed Jun 17 2015 Fedora Release Engineering - 1.16.16-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - * Sun Apr 26 2015 Sérgio Basto - 1.16.16-5 - Fix build for all versions, previous try wasn't correct and back with dpkg-perl-libexecdir.patch . diff --git a/sources b/sources index 0a351dd..13ad236 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e2d761a3c4a9a9e1856337557ec1f9e dpkg_1.17.27.tar.xz +88d0e4c98ecb8afe6dee896a2aa9665d dpkg_1.16.16.tar.xz