Update of /cvsroot/fink/experimental/thesin/finkinfo
In directory vz-cvs-3.sog:/tmp/cvs-serv15457
Modified Files:
dpkg.info dpkg.patch
Log Message:
Add Fink as a Vendor to dpkg, add postinst script to active fink origins since
it was never done in the past, all of this should be in base-files but fink has
always done it in dpkg so I'll keep it here.
Index: dpkg.patch
===================================================================
RCS file: /cvsroot/fink/experimental/thesin/finkinfo/dpkg.patch,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- dpkg.patch 10 Jul 2012 18:07:43 -0000 1.14
+++ dpkg.patch 31 Jul 2012 21:59:25 -0000 1.15
@@ -673,6 +673,111 @@
+ package by using `dpkg --install --auto-deconfigure'\'' by hand.
+
+ ";
+diff -ruN dpkg-1.16.4.3.orig/fink/patches/fink-as-vendor.patch
dpkg-1.16.4.3/fink/patches/fink-as-vendor.patch
+--- dpkg-1.16.4.3.orig/fink/patches/fink-as-vendor.patch 1969-12-31
17:00:00.000000000 -0700
++++ dpkg-1.16.4.3/fink/patches/fink-as-vendor.patch 2012-07-31
15:46:48.000000000 -0600
+@@ -0,0 +1,101 @@
++--- a/scripts/Dpkg/Vendor/Fink.pm 2012-07-31 15:29:11.000000000 -0600
+++++ b/scripts/Dpkg/Vendor/Fink.pm 2012-07-31 14:57:25.000000000 -0600
++@@ -0,0 +1,98 @@
+++# Copyright © 2009-2011 Raphaël Hertzog <[email protected]>
+++#
+++# Hardening build flags handling derived from work of:
+++# Copyright © 2009-2011 Kees Cook <[email protected]>
+++# Copyright © 2007-2008 Canonical, Ltd.
+++#
+++# This program is free software; you can redistribute it and/or modify
+++# it under the terms of the GNU General Public License as published by
+++# the Free Software Foundation; either version 2 of the License, or
+++# (at your option) any later version.
+++#
+++# This program is distributed in the hope that it will be useful,
+++# but WITHOUT ANY WARRANTY; without even the implied warranty of
+++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+++# GNU General Public License for more details.
+++#
+++# You should have received a copy of the GNU General Public License
+++# along with this program. If not, see <http://www.gnu.org/licenses/>.
+++
+++package Dpkg::Vendor::Fink;
+++
+++use strict;
+++use warnings;
+++
+++our $VERSION = "0.01";
+++
+++use base qw(Dpkg::Vendor::Default);
+++
+++use Dpkg::Gettext;
+++use Dpkg::ErrorHandling;
+++use Dpkg::Control::Types;
+++use Dpkg::Vendor::Ubuntu;
+++use Dpkg::BuildOptions;
+++use Dpkg::Arch qw(get_host_arch debarch_to_debtriplet);
+++
+++=encoding utf8
+++
+++=head1 NAME
+++
+++Dpkg::Vendor::Fink - Fink vendor object
+++
+++=head1 DESCRIPTION
+++
+++This vendor object customize the behaviour of dpkg scripts
+++for Fink specific actions.
+++
+++=cut
+++
+++sub run_hook {
+++ my ($self, $hook, @params) = @_;
+++
+++ if ($hook eq "before-source-build") {
+++ my $srcpkg = shift @params;
+++ } elsif ($hook eq "keyrings") {
+++ return ();
+++ } elsif ($hook eq "register-custom-fields") {
+++ return ();
+++ } elsif ($hook eq "post-process-changelog-entry") {
+++ my $fields = shift @params;
+++ } elsif ($hook eq "extend-patch-header") {
+++ my ($textref, $ch_info) = @params;
+++ } elsif ($hook eq "update-buildflags") {
+++ $self->add_hardening_flags(@params);
+++ } else {
+++ return $self->SUPER::run_hook($hook, @params);
+++ }
+++}
+++
+++sub add_hardening_flags {
+++ my ($self, $flags) = @_;
+++ my $arch = get_host_arch();
+++ my ($abi, $os, $cpu) = debarch_to_debtriplet($arch);
+++
+++ unless (defined $abi and defined $os and defined $cpu) {
+++ warning(_g("unknown host architecture '%s'"), $arch);
+++ ($abi, $os, $cpu) = ("", "", "");
+++ }
+++
+++ # start by removing the Dpkg defaults "-g -O2"
+++ $flags->strip("CFLAGS", "-g");
+++ $flags->strip("CXXFLAGS", "-g");
+++ $flags->strip("FFLAGS", "-g");
+++ $flags->strip("CFLAGS", "-O2");
+++ $flags->strip("CXXFLAGS", "-O2");
+++ $flags->strip("FFLAGS", "-O2");
+++
+++ $flags->append("CPPFLAGS", "-I@FINKPREFIX@/include");
+++ $flags->append("LDFLAGS", "-L@FINKPREFIX@/lib");
+++
+++ # for building 64bit libraries, we change LDFLAGS:
+++ #if (exists $self->{_type_hash}->{"-64bit"}) {
+++ # if ($self->{_type_hash}->{"-64bit"} eq "-64bit") {
+++ # $defaults{"LDFLAGS"} = "-L\%p/\%lib -L\%p/lib";
+++ # }
+++ #}
+++}
+++
+++1;
diff -ruN dpkg-1.16.4.3.orig/fink/patches/fink-triggers.patch
dpkg-1.16.4.3/fink/patches/fink-triggers.patch
--- dpkg-1.16.4.3.orig/fink/patches/fink-triggers.patch 1969-12-31
17:00:00.000000000 -0700
+++ dpkg-1.16.4.3/fink/patches/fink-triggers.patch 2012-07-09
16:04:16.000000000 -0600
Index: dpkg.info
===================================================================
RCS file: /cvsroot/fink/experimental/thesin/finkinfo/dpkg.info,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- dpkg.info 23 Jul 2012 21:28:52 -0000 1.31
+++ dpkg.info 31 Jul 2012 21:59:25 -0000 1.32
@@ -3,7 +3,7 @@
Revision: 1
GCC: 4.0
## Remove po4a
-BuildDepends: fink (>= 0.24.12), libgettext8-dev, gettext-tools, liblzma5,
pkgconfig, bzip2-dev, libncursesw5
+BuildDepends: fink (>= 0.24.12), libgettext8-dev, gettext-tools (>= 0.18),
liblzma5, pkgconfig, bzip2-dev, libncursesw5
Depends: bzip2-shlibs, libgettext8-shlibs, liblzma5-shlibs, tar, install-info
Conflicts: dpkg-bootstrap
Replaces: dpkg-bootstrap
@@ -16,7 +16,7 @@
Source-MD5: 39c74a948c6fe4c02ed9f15556fe179d
PatchFile: %n.patch
-PatchFile-MD5: 6d2a11a75ab987816752946ee05f992e
+PatchFile-MD5: 80841f8a22fcb9db6ae4780e7fe267cb
PatchScript: <<
sed -e 's,@FINKPREFIX@,%p,g' %{PatchFile} | patch -p1
@@ -34,15 +34,13 @@
patch -p1 < fink/patches/so-to-dylib.patch
patch -p1 < fink/patches/test-fix.patch
patch -p1 < fink/patches/update-alternative.patch
+patch -p1 < fink/patches/fink-as-vendor.patch
# Remove po4a and make sure it can't be found if it's installed
# this is to keep fink policy happy since it has to build the same
# everytime on all systems
perl -pi -e 's,po4a,notpo4a,g' configure
-# Fix for msgmerge 0.17, this won't be required with 0.18+
-perl -pi -e 's,--previous,--backup=off --previous,g' dselect/po/Makevars
man/Makefile.am man/Makefile.in po/Makevars scripts/po/Makevars
-
# Make sure all scripts have use lib %p/lib/perl5 to find the modules it needs
perl -pi -e 's,^(\#\!/usr/bin/perl.*)$,$1\nuse lib "%p/lib/perl5";,'
%b/scripts/*.pl
@@ -99,12 +97,16 @@
install -m 0755 fink/md5sum %i/bin
+# install fink as a vendor
+install -m 0644 scripts/Dpkg/Vendor/Fink.pm %i/lib/perl5/Dpkg/Vendor/Fink.pm
+
# some files that were previously installed in sbin are now in bin
# but some stuff still expects it in sbin
ln -s %p/bin/dpkg-divert %i/sbin/dpkg-divert
ln -s %p/bin/dpkg-statoverride %i/sbin/dpkg-statoverride
ln -s %p/bin/update-alternatives %i/sbin/update-alternatives
<<
+ConfFiles: %p/etc/dpkg/origins/fink
DocFiles: <<
ABOUT-NLS AUTHORS COPYING ChangeLog NEWS
README README.translators THANKS TODO
@@ -303,6 +305,26 @@
# If prerm fails during replacement due to conflict:
# <postinst> abort-remove in-favour <new-package> <version>
+# this should be done in base-files but since fink has origins in dpkg we
+# do it here
+if [ ! -e %p/etc/dpkg/origins/default ]; then
+ if [ -e %p/etc/dpkg/origins/fink ]; then
+ ln -sf fink %p/etc/dpkg/origins/default
+ fi
+fi
+
+if [ ! -d %p/var/lib/dpkg ]; then
+ mkdir -m 755 -p %p/var/lib/dpkg
+ chown root:root %p/var/lib/dpkg
+fi
+
+if [ ! -f %p/var/lib/dpkg/status ]; then
+ echo > %p/var/lib/dpkg/status
+ chmod 644 %p/var/lib/dpkg/status
+ chown root:root %p/var/lib/dpkg/status
+fi
+
+### end base-files postinst stuff
# Create the database files if they don't already exist
create_database() {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs