Update version, modernize packaging, include fallback pid_is_* on Solaris,

Tue, 28 Aug 2012 19:00:20 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 19:00:20 +0200
changeset 626
03d66ab4c7ca
parent 625
6a62f7ecb64c
child 627
aba05e03de0f

Update version, modernize packaging, include fallback pid_is_* on Solaris,
remove defective KVM integration logic, and replace Burrows–Wheeler source
compression with LZMA.

dpkg/dpkg.patch file | annotate | diff | comparison | revisions
dpkg/dpkg.spec file | annotate | diff | comparison | revisions
     1.1 --- a/dpkg/dpkg.patch	Tue Aug 28 22:15:58 2012 +0200
     1.2 +++ b/dpkg/dpkg.patch	Tue Aug 28 19:00:20 2012 +0200
     1.3 @@ -1,108 +1,37 @@
     1.4 -Index: dpkg-deb/Makefile.in
     1.5 ---- dpkg-deb/Makefile.in.orig	2008-03-30 11:58:18 +0200
     1.6 -+++ dpkg-deb/Makefile.in	2008-04-01 21:56:55 +0200
     1.7 -@@ -213,8 +213,7 @@
     1.8 - 	main.c
     1.9 +Index: configure
    1.10 +--- configure.orig	2012-03-19 08:58:04.000000000 +0100
    1.11 ++++ configure	2012-03-20 08:27:36.000000000 +0100
    1.12 +@@ -10918,7 +10918,7 @@
    1.13 + WFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers \
    1.14 + 	 -Wmissing-declarations -Wmissing-format-attribute \
    1.15 + 	 -Wformat-security -Wpointer-arith \
    1.16 +-	 -Wvla -Winit-self -Wwrite-strings -Wcast-align -Wshadow"
    1.17 ++	 -Winit-self -Wwrite-strings -Wcast-align -Wshadow"
    1.18 + WCFLAGS="-Wdeclaration-after-statement -Wnested-externs -Wbad-function-cast \
    1.19 + 	 -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
    1.20 + # Temporarily here until #542031 gets fixed in ncurses
    1.21 +Index: lib/dpkg/dpkg-db.h
    1.22 +--- lib/dpkg/dpkg-db.h.orig	2012-03-19 08:56:40.000000000 +0100
    1.23 ++++ lib/dpkg/dpkg-db.h	2012-03-20 08:27:36.000000000 +0100
    1.24 +@@ -27,6 +27,7 @@
    1.25   
    1.26 - dpkg_deb_LDADD = \
    1.27 --	../libcompat/libcompat.a \
    1.28 --	$(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS)
    1.29 -+	$(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS) ../libcompat/libcompat.a
    1.30 + #include <stdbool.h>
    1.31 + #include <stdio.h>
    1.32 ++#include <stdarg.h>
    1.33   
    1.34 - all: all-am
    1.35 + #include <dpkg/macros.h>
    1.36 + #include <dpkg/varbuf.h>
    1.37 +Index: man/Makefile.in
    1.38 +--- man/Makefile.in.orig	2012-03-19 08:58:07.000000000 +0100
    1.39 ++++ man/Makefile.in	2012-03-20 08:27:36.000000000 +0100
    1.40 +@@ -636,12 +636,12 @@
    1.41   
    1.42 -Index: dpkg-split/Makefile.in
    1.43 ---- dpkg-split/Makefile.in.orig	2008-03-30 11:58:18 +0200
    1.44 -+++ dpkg-split/Makefile.in	2008-04-01 21:57:43 +0200
    1.45 -@@ -217,9 +217,8 @@
    1.46 - 	split.c
    1.47   
    1.48 - dpkg_split_LDADD = \
    1.49 --	../libcompat/libcompat.a \
    1.50 - 	$(LIBINTL) \
    1.51 --	../lib/libdpkg.a
    1.52 -+	../lib/libdpkg.a ../libcompat/libcompat.a
    1.53 + # If the user has not defined it let's use the default.
    1.54 +-LINGUAS ?= $(LINGUAS_DIST)
    1.55 ++LINGUAS =
    1.56   
    1.57 - pkglib_SCRIPTS = mksplit
    1.58 - EXTRA_DIST = mksplit.pl
    1.59 -Index: dselect/Makefile.in
    1.60 ---- dselect/Makefile.in.orig	2008-03-30 11:58:18 +0200
    1.61 -+++ dselect/Makefile.in	2008-04-01 21:56:55 +0200
    1.62 -@@ -249,10 +249,9 @@
    1.63 - 	pkgtop.cc
    1.64 - 
    1.65 - dselect_LDADD = \
    1.66 --	../libcompat/libcompat.a \
    1.67 - 	$(LIBINTL) \
    1.68 - 	$(CURSES_LIBS) \
    1.69 --	../lib/libdpkg.a
    1.70 -+	../lib/libdpkg.a ../libcompat/libcompat.a
    1.71 - 
    1.72 - EXTRA_DIST = keyoverride mkcurkeys.pl
    1.73 - CLEANFILES = curkeys.h
    1.74 -@@ -640,8 +639,8 @@
    1.75 - 
    1.76 - curkeys.$(OBJEXT): curkeys.h
    1.77 - curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl
    1.78 --	cursesfile=`echo '#include <ncursesw/curses.h>' | \
    1.79 --		$(CC) -E - | grep 'curses.h' | head -n 1 | \
    1.80 -+	cursesfile=`echo '#include <ncurses/curses.h>' | \
    1.81 -+		$(CC) $(CPPFLAGS) -E - | grep 'curses.h' | head -n 1 | \
    1.82 - 		sed -e 's/^[^"]*"//; s/".*$$//'`; \
    1.83 - 	if [ "$$cursesfile" = "" ]; then \
    1.84 - 		echo "can't find curses file"; exit 1; \
    1.85 -Index: dselect/dselect.h
    1.86 ---- dselect/dselect.h.orig	2008-03-30 11:57:41 +0200
    1.87 -+++ dselect/dselect.h	2008-04-01 21:56:55 +0200
    1.88 -@@ -28,7 +28,7 @@
    1.89 - 
    1.90 - #include <signal.h>
    1.91 - #undef ERR
    1.92 --#include <ncursesw/curses.h>
    1.93 -+#include <ncurses/curses.h>
    1.94 - 
    1.95 - struct helpmenuentry {
    1.96 -   char key;
    1.97 -Index: dselect/main.cc
    1.98 ---- dselect/main.cc.orig	2008-03-30 11:57:41 +0200
    1.99 -+++ dselect/main.cc	2008-04-01 21:56:55 +0200
   1.100 -@@ -37,7 +37,7 @@
   1.101 - #include <ctype.h>
   1.102 - #include <assert.h>
   1.103 - 
   1.104 --#include <ncursesw/term.h>
   1.105 -+#include <ncurses/term.h>
   1.106 - 
   1.107 - extern "C" {
   1.108 - #include <dpkg.h>
   1.109 -Index: lib/tarfn.c
   1.110 ---- lib/tarfn.c.orig	2008-03-30 10:58:51 +0200
   1.111 -+++ lib/tarfn.c	2008-04-01 21:56:55 +0200
   1.112 -@@ -62,7 +62,9 @@
   1.113 - 	int	len;
   1.114 - 	char *	str;
   1.115 - 
   1.116 --	len = strnlen(s, size);
   1.117 -+	len = strlen(s);
   1.118 -+    if (len > size)
   1.119 -+        len = size;
   1.120 - 	str = m_malloc(len + 1);
   1.121 - 	memcpy(str, s, len);
   1.122 - 	str[len] = 0;
   1.123 -Index: man/Makefile.in
   1.124 ---- man/Makefile.in.orig	2008-03-30 11:58:18 +0200
   1.125 -+++ man/Makefile.in	2008-04-01 21:56:55 +0200
   1.126 -@@ -189,7 +189,7 @@
   1.127 - top_srcdir = @top_srcdir@
   1.128 - 
   1.129 - # Extract the list of languages from the po4a config file.
   1.130 --LINGUAS = $(shell sed -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/po/po4a.cfg)
   1.131 -+LINGUAS =
   1.132 - dist_man_MANS = \
   1.133 - 	822-date.1 \
   1.134 - 	cleanup-info.8 \
   1.135 -@@ -540,7 +540,7 @@
   1.136 - all-local: all-local-@USE_NLS@
   1.137 + all-local: all-local-@USE_PO4A@
   1.138   
   1.139   all-local-no:
   1.140  -all-local-yes: man.stamp
   1.141 @@ -110,53 +39,3 @@
   1.142   
   1.143   # FIXME: Use a stamp file until po4a supports them internally.
   1.144   man.stamp:
   1.145 -Index: scripts/Makefile.in
   1.146 ---- scripts/Makefile.in.orig	2008-03-30 11:58:19 +0200
   1.147 -+++ scripts/Makefile.in	2008-04-01 21:56:55 +0200
   1.148 -@@ -757,8 +757,8 @@
   1.149 - 	$(INSTALL_SCRIPT) install-info $(DESTDIR)$(sbindir)
   1.150 - 
   1.151 - install-data-local:
   1.152 --	$(mkdir_p) $(DESTDIR)$(sysconfdir)/alternatives
   1.153 --	$(INSTALL_DATA) $(srcdir)/README.alternatives $(DESTDIR)$(sysconfdir)/alternatives/README
   1.154 -+	$(mkdir_p) $(DESTDIR)$(sysconfdir)/dpkg/alternatives
   1.155 -+	$(INSTALL_DATA) $(srcdir)/README.alternatives $(DESTDIR)$(sysconfdir)/dpkg/alternatives/README
   1.156 - 
   1.157 - # Ideally we'd use 'sed -i', but unfortunately that's not portable.
   1.158 - install-data-hook:
   1.159 -Index: src/Makefile.in
   1.160 ---- src/Makefile.in.orig	2008-03-30 11:58:19 +0200
   1.161 -+++ src/Makefile.in	2008-04-01 21:56:55 +0200
   1.162 -@@ -239,8 +239,8 @@
   1.163 - 	update.c
   1.164 - 
   1.165 - dpkg_LDADD = \
   1.166 --	../libcompat/libcompat.a \
   1.167 --	$(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS)
   1.168 -+	\
   1.169 -+	$(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS) ../libcompat/libcompat.a 
   1.170 - 
   1.171 - dpkg_query_SOURCES = \
   1.172 - 	errors.c \
   1.173 -@@ -248,17 +248,17 @@
   1.174 - 	query.c
   1.175 - 
   1.176 - dpkg_query_LDADD = \
   1.177 --	../libcompat/libcompat.a \
   1.178 -+	\
   1.179 - 	$(LIBINTL) \
   1.180 --	../lib/libdpkg.a
   1.181 -+	../lib/libdpkg.a ../libcompat/libcompat.a 
   1.182 - 
   1.183 - dpkg_trigger_SOURCES = \
   1.184 - 	trigcmd.c
   1.185 - 
   1.186 - dpkg_trigger_LDADD = \
   1.187 --	../libcompat/libcompat.a \
   1.188 -+	\
   1.189 - 	$(LIBINTL) \
   1.190 --	../lib/libdpkg.a
   1.191 -+	../lib/libdpkg.a ../libcompat/libcompat.a 
   1.192 - 
   1.193 - all: all-am
   1.194 - 
     2.1 --- a/dpkg/dpkg.spec	Tue Aug 28 22:15:58 2012 +0200
     2.2 +++ b/dpkg/dpkg.spec	Tue Aug 28 19:00:20 2012 +0200
     2.3 @@ -1,6 +1,6 @@
     2.4  ##
     2.5  ##  dpkg.spec -- OpenPKG RPM Package Specification
     2.6 -##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.8  ##
     2.9  ##  Permission to use, copy, modify, and distribute this software for
    2.10  ##  any purpose with or without fee is hereby granted, provided that
    2.11 @@ -22,8 +22,8 @@
    2.12  ##
    2.13  
    2.14  #   package version
    2.15 -%define       V_tarball   1.14.24
    2.16 -%define       V_subdir    1.14.24
    2.17 +%define       V_tarball   1.16.8
    2.18 +%define       V_subdir    1.16.8
    2.19  
    2.20  #   package information
    2.21  Name:         dpkg
    2.22 @@ -36,21 +36,17 @@
    2.23  Group:        Archiver
    2.24  License:      GPL
    2.25  Version:      %{V_tarball}
    2.26 -Release:      20090106
    2.27 +Release:      20120800
    2.28  
    2.29  #   list of sources
    2.30 -Source0:      http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.gz
    2.31 +Source0:      http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.xz
    2.32  Patch0:       dpkg.patch
    2.33  
    2.34  #   build information
    2.35 -Prefix:       %{l_prefix}
    2.36 -BuildRoot:    %{l_buildroot}
    2.37 -BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes
    2.38 -PreReq:       OpenPKG, openpkg >= 20040130
    2.39 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes
    2.40 +PreReq:       OpenPKG, openpkg >= 20100101
    2.41  BuildPreReq:  gettext, libiconv, bzip2, zlib
    2.42  PreReq:       gettext, libiconv, bzip2, zlib
    2.43 -AutoReq:      no
    2.44 -AutoReqProv:  no
    2.45  
    2.46  %description
    2.47      dpkg is the heart of the Debian GNU/Linux package management
    2.48 @@ -61,26 +57,32 @@
    2.49      prog dpkg = {
    2.50          version   = %{version}
    2.51          url       = http://ftp.debian.org/debian/pool/main/d/dpkg/
    2.52 -        regex     = dpkg_(__VER__)\.tar\.gz
    2.53 +        regex     = dpkg_(__VER__)\.tar\.xz
    2.54      }
    2.55  
    2.56  %prep
    2.57      %setup -q -n dpkg-%{V_subdir}
    2.58      %patch -p0
    2.59 +    %{l_shtool} subst \
    2.60 +        -e 's;\(defined(OSLinux)\)$;\1 || defined(OSsunos);g' \
    2.61 +        utils/start-stop-daemon.c
    2.62  
    2.63  %build
    2.64 +    ( echo "ac_cv_header_kvm_h=no"
    2.65 +    ) >config.cache
    2.66      CC="%{l_cc}" \
    2.67      CXX="%{l_cxx}" \
    2.68      CFLAGS="%{l_cflags -O}" \
    2.69      CXXFLAGS="%{l_cxxflags -O}" \
    2.70 -    CPPFLAGS="%{l_cppflags}" \
    2.71 +    CPPFLAGS="%{l_cppflags} -I`pwd`" \
    2.72      LDFLAGS="%{l_ldflags}" \
    2.73 +    LIBS="-lintl -liconv" \
    2.74      ./configure \
    2.75 +        --cache-file=./config.cache \
    2.76          --prefix=%{l_prefix} \
    2.77          --mandir=%{l_prefix}/man \
    2.78          --with-libiconv-prefix=%{l_prefix} \
    2.79          --with-libintl-prefix=%{l_prefix} \
    2.80 -        --without-included-gettext \
    2.81          --with-dselect \
    2.82          --without-start-stop-daemon \
    2.83          --with-admindir=%{l_prefix}/var/dpkg \
    2.84 @@ -90,8 +92,7 @@
    2.85      %{l_make} %{l_mflags -O}
    2.86  
    2.87  %install
    2.88 -    rm -rf $RPM_BUILD_ROOT
    2.89 -    %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT LINGUAS=doit
    2.90 +    %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
    2.91      strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
    2.92      rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
    2.93      for bin in 822-date cleanup-info install-info update-alternatives; do
    2.94 @@ -108,5 +109,4 @@
    2.95  %files -f files
    2.96  
    2.97  %clean
    2.98 -    rm -rf $RPM_BUILD_ROOT
    2.99  

mercurial