delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/21/21:43:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [66.167.126.138]
X-Originating-Email: [rkitover AT hotmail DOT com]
X-Sender: rkitover AT hotmail DOT com
From: "Rafael Kitover" <caelum AT debian DOT org>
To: <cygwin AT cygwin DOT com>
Subject: [PATCH] rebase: Pick up more dlls when using rebaseall
Date: Sat, 21 Feb 2004 18:43:17 -0800
MIME-Version: 1.0
Message-ID: <BAY12-DAV7GuKeddZRk00000d24@hotmail.com>
X-OriginalArrivalTime: 22 Feb 2004 02:43:24.0039 (UTC) FILETIME=[A416A170:01C3F8ED]
Note-from-DJ: This may be spam

------=_NextPart_000_004E_01C3F8AA.91CF8150
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

This modification to the rebaseall script will allow it to work on .dll extensions created by Perl modules downloaded from CPAN, ie
using perl -MCPAN -e shell, site python dlls, and any dlls that can be found in /usr/local, /install, /home and /opt. find does not
recurse into symlinked directories, so there should be no danger of rebasing dlls not intended for cygwin.

I thought about adding some code to ignore zsh dlls from the current version of zsh, but from my vague understanding of the progress
of that issue, the problem seems to be in rebase, related to some symbols not getting changed:
http://www.cygwin.com/ml/cygwin/2004-02/msg00573.html
so rebaseall should work with any version of zsh once rebase is fixed.

Also a minor nit about the rebase package, the readme is under /usr/doc/Cygwin rather than /usr/share/doc/Cygwin.

-- 
Rafael

------=_NextPart_000_004E_01C3F8AA.91CF8150
Content-Type: application/octet-stream;
	name="rebaseall-moredlls.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="rebaseall-moredlls.patch"

--- /usr/bin/rebaseall.orig	2004-02-14 21:31:23.156250000 -0800
+++ /usr/bin/rebaseall	2004-02-14 22:44:37.015625000 -0800
@@ -82,8 +82,23 @@
 zcat /etc/setup/*.lst.gz | grep 'dll$' |
     sed -e '/cygwin1.dll$/d' -e 's/^/\//' -e 's/apache\/new/apache/' >$Tmp=
File
=20
+# Try to find a good chunk of any non-package .dlls
+find /usr/local /usr/lib/perl5/site_perl /lib/python*/site-packages /insta=
ll \
+     /home /opt \
+	-name '*.dll' 2>/dev/null >>$TmpFile
+
+# Get rid of duplicates
+sort -o ${TmpFile}.$$ -u $TmpFile
+mv ${TmpFile}.$$ $TmpFile
+
+# Set perl libs writable for rebase
+grep perl5 $TmpFile | xargs -i chmod u+w {}
+
 # Rebase files
 rebase $Verbose -d -b $BaseAddress -o $Offset -T $TmpFile
=20
+# Reset perl libs to read-only
+grep perl5 $TmpFile | xargs -i chmod u-w {}
+
 # Clean up
 cleanup


------=_NextPart_000_004E_01C3F8AA.91CF8150
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
------=_NextPart_000_004E_01C3F8AA.91CF8150--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019