public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] rebase: Pick up more dlls when using rebaseall
@ 2004-02-22  3:14 Rafael Kitover
  2004-02-25  0:19 ` Jason Tishler
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael Kitover @ 2004-02-22  3:14 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

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

[-- Attachment #2: rebaseall-moredlls.patch --]
[-- Type: application/octet-stream, Size: 837 bytes --]

--- /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/' >$TmpFile
 
+# Try to find a good chunk of any non-package .dlls
+find /usr/local /usr/lib/perl5/site_perl /lib/python*/site-packages /install \
+     /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
 
+# Reset perl libs to read-only
+grep perl5 $TmpFile | xargs -i chmod u-w {}
+
 # Clean up
 cleanup


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rebase: Pick up more dlls when using rebaseall
  2004-02-22  3:14 [PATCH] rebase: Pick up more dlls when using rebaseall Rafael Kitover
@ 2004-02-25  0:19 ` Jason Tishler
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Tishler @ 2004-02-25  0:19 UTC (permalink / raw)
  To: cygwin

Rafael,

On Sat, Feb 21, 2004 at 06:43:17PM -0800, Rafael Kitover wrote:
> 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 would prefer a patch that adds support for (multiple) -T options to
rebaseall (and rebase) to allow one or more lists of extra DLLs to be
specified.  This will cover *all* DLLs and not just the ones you listed
above.  Additionally, it should perform much better on large directory
trees like my home directory! :,)

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

Sigh... I haven't released a rebase package since FHS compliance became a
requirement.  The above will be rectified when I do so.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-24 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-22  3:14 [PATCH] rebase: Pick up more dlls when using rebaseall Rafael Kitover
2004-02-25  0:19 ` Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).