git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCHES] CURLDIR support, more usable cmd-rename.sh
@ 2005-09-19 11:14 Patrick Mauritz
  2005-09-19 13:37 ` Petr Baudis
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Mauritz @ 2005-09-19 11:14 UTC (permalink / raw
  To: git

hello,

attached are two patches.

the first is an updated implementation of CURLDIR support (for those who
have libcurl outside their library search path)

the second changes cmd-rename.sh so that it only adds symlinks to
executables that actually exist (eg. when building with NO_CURL,
git-http-pull would still be created).

another issue I had was that mailinfo uses strcasestr, which isn't in
solaris' libc (and not in posix according to
http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00076.html). I
disabled it in my build for now, and might come up with a patch later,
unless someone beats me to it.


patrick mauritz

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

* Re: [PATCHES] CURLDIR support, more usable cmd-rename.sh
  2005-09-19 11:14 [PATCHES] CURLDIR support, more usable cmd-rename.sh Patrick Mauritz
@ 2005-09-19 13:37 ` Petr Baudis
  2005-09-19 14:11   ` Patrick Mauritz
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Baudis @ 2005-09-19 13:37 UTC (permalink / raw
  To: Patrick Mauritz; +Cc: git

Dear diary, on Mon, Sep 19, 2005 at 01:14:36PM CEST, I got a letter
where Patrick Mauritz <oxygene@studentenbude.ath.cx> told me that...
> hello,

Hello,

> attached are two patches.

seems that they didn't quite get attached in the end. ;-)

> another issue I had was that mailinfo uses strcasestr, which isn't in
> solaris' libc (and not in posix according to
> http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00076.html). I
> disabled it in my build for now, and might come up with a patch later,
> unless someone beats me to it.

Linus already did in <Pine.LNX.4.58.0509181829310.9106@g5.osdl.org>.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone.  -- Alan Cox

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

* Re: [PATCHES] CURLDIR support, more usable cmd-rename.sh
  2005-09-19 13:37 ` Petr Baudis
@ 2005-09-19 14:11   ` Patrick Mauritz
  2005-09-19 14:37     ` Matthias Urlichs
  2005-09-19 16:34     ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Patrick Mauritz @ 2005-09-19 14:11 UTC (permalink / raw
  To: Petr Baudis; +Cc: git

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

On Mon, 2005-09-19 at 15:37, Petr Baudis wrote:
> seems that they didn't quite get attached in the end. ;-)
oops :)
here they are

> Linus already did in <Pine.LNX.4.58.0509181829310.9106@g5.osdl.org>.
yay :)


patrick mauritz

[-- Attachment #2: patch-20050919-1-curl --]
[-- Type: text/x-patch, Size: 655 bytes --]

diff -ur git-core-0.99.7.orig//Makefile git-core-0.99.7/Makefile
--- git-core-0.99.7.orig//Makefile	Mon Sep 19 12:43:04 2005
+++ git-core-0.99.7/Makefile	Mon Sep 19 12:45:45 2005
@@ -42,7 +42,10 @@
 
 GIT_VERSION = 0.99.7
 
-CFLAGS = -g -O2 -Wall
+CFLAGS = -g -O2
+ifdef CURLDIR
+CFLAGS+=-I$(CURLDIR)/include
+endif
 ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES)
 
 prefix = $(HOME)
@@ -261,7 +264,11 @@
 git-ssh-pull: rsh.o fetch.o
 git-ssh-push: rsh.o
 
+ifdef CURLDIR
+git-http-fetch: LIBS += -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl
+else
 git-http-fetch: LIBS += -lcurl
+endif
 git-rev-list: LIBS += $(OPENSSL_LIBSSL)
 
 init-db.o: init-db.c

[-- Attachment #3: patch-20050919-3-cmdrename --]
[-- Type: text/plain, Size: 294 bytes --]

--- cmd-rename.sh~	Mon Sep 19 12:53:40 2005
+++ git-core-0.99.7/cmd-rename.sh	Mon Sep 19 12:53:58 2005
@@ -4,7 +4,9 @@
 while read old new
 do
 	rm -f "$d/$old"
+	if [ -x "$d/$new" ]; then
 	ln -s "$new" "$d/$old"
+	fi
 done <<\EOF
 git-add-script	git-add
 git-archimport-script	git-archimport

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

* Re: [PATCHES] CURLDIR support, more usable cmd-rename.sh
  2005-09-19 14:11   ` Patrick Mauritz
@ 2005-09-19 14:37     ` Matthias Urlichs
  2005-09-19 16:34     ` Junio C Hamano
  1 sibling, 0 replies; 7+ messages in thread
From: Matthias Urlichs @ 2005-09-19 14:37 UTC (permalink / raw
  To: git

Hi, Patrick Mauritz wrote:

> -CFLAGS = -g -O2 -Wall
> +CFLAGS = -g -O2

Umm, no, you don't get to unconditionally throw way -Wall.

*Some* people think this flag makes sense and that the sane default
(on sane OSes, i.e. those who have GCC and glibc) should be to include it. 
 ;-)

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
I must have a prodigious quantity of mind; it takes me as much as a
week sometimes to make it up.
		-- Mark Twain, "The Innocents Abroad"

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

* Re: [PATCHES] CURLDIR support, more usable cmd-rename.sh
  2005-09-19 14:11   ` Patrick Mauritz
  2005-09-19 14:37     ` Matthias Urlichs
@ 2005-09-19 16:34     ` Junio C Hamano
  2005-09-19 17:40       ` Patrick Mauritz
  1 sibling, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2005-09-19 16:34 UTC (permalink / raw
  To: Patrick Mauritz; +Cc: git

Patrick Mauritz <oxygene@studentenbude.ath.cx> writes:

> diff -ur git-core-0.99.7.orig//Makefile git-core-0.99.7/Makefile
> --- git-core-0.99.7.orig//Makefile	Mon Sep 19 12:43:04 2005
> +++ git-core-0.99.7/Makefile	Mon Sep 19 12:45:45 2005

Why not a patch from either git or cogito or stgit ;-)?
Anyway, thanks for your patch.

> -CFLAGS = -g -O2 -Wall
> +CFLAGS = -g -O2

Not relevant to the current topic as far as I can tell (unless
your non-standard curl include files trip under -Wall).

> +ifdef CURLDIR
> +CFLAGS+=-I$(CURLDIR)/include
> +endif
>  ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES)
>  
>  prefix = $(HOME)
> @@ -261,7 +264,11 @@
>  git-ssh-pull: rsh.o fetch.o
>  git-ssh-push: rsh.o
>  
> +ifdef CURLDIR
> +git-http-fetch: LIBS += -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl
> +else
>  git-http-fetch: LIBS += -lcurl
> +endif

I do not have any objections to helping installations where CURL
is installed somewhere nonstandard, but if that is the case I am
wondering if assuming that they are all in the same directory
hierarchy covers enough.  CURLDIR=/usr/local/ would be OK and
CURLDIR=/opt/curl/ would be as well with this patch, so this
probably is fine.  Installations without ld.so.conf need -R, but
is it safe to always force -R like this?

Also I wonder if we need similar customization for openssl
stuff, but that is a separate topic.

> --- cmd-rename.sh~	Mon Sep 19 12:53:40 2005
> +++ git-core-0.99.7/cmd-rename.sh	Mon Sep 19 12:53:58 2005
> @@ -4,7 +4,9 @@
>  while read old new
>  do
>  	rm -f "$d/$old"
> +	if [ -x "$d/$new" ]; then
>  	ln -s "$new" "$d/$old"
> +	fi

No questions about this part.  Thanks for the fix.

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

* Re: [PATCHES] CURLDIR support, more usable cmd-rename.sh
  2005-09-19 16:34     ` Junio C Hamano
@ 2005-09-19 17:40       ` Patrick Mauritz
  2005-09-20  6:25         ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Mauritz @ 2005-09-19 17:40 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

On Mon, 2005-09-19 at 18:34, Junio C Hamano wrote:
> Why not a patch from either git or cogito or stgit ;-)?
because my only use for git is with monotone's git import.

> Not relevant to the current topic as far as I can tell (unless
> your non-standard curl include files trip under -Wall).
the only issue with this is that sunpro's cc doesn't like -Wall

> Installations without ld.so.conf need -R, but
> is it safe to always force -R like this?
the only case that comes to mind is where you want to link git against
a library which is at a different location now than it is later, eg. in
conjunction with DESTDIR or similar means.
as long as git doesn't build any shared libraries by itself and links to
them, this shouldn't be an issue.


patrick mauritz

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

* Re: [PATCHES] CURLDIR support, more usable cmd-rename.sh
  2005-09-19 17:40       ` Patrick Mauritz
@ 2005-09-20  6:25         ` Junio C Hamano
  0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2005-09-20  6:25 UTC (permalink / raw
  To: Patrick Mauritz; +Cc: git

Patrick Mauritz <oxygene@studentenbude.ath.cx> writes:

>> Not relevant to the current topic as far as I can tell (unless
>> your non-standard curl include files trip under -Wall).
> the only issue with this is that sunpro's cc doesn't like -Wall

Since you will be saying "make CURLDIR=blah" anyway, I'd ask you
to say "make CURLDIR=blah CFLAGS='-O -g'" and will forget about
this part.

The rest of your patch I am keeping a variant based on it, done
slightly differently, in the proposed updates branch.  I'll have
it graduate to the master branch when I hear from somebody (can
be you) with SunPro that the it is OK (or an improvement patch).

Thanks.

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

end of thread, other threads:[~2005-09-20  6:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-19 11:14 [PATCHES] CURLDIR support, more usable cmd-rename.sh Patrick Mauritz
2005-09-19 13:37 ` Petr Baudis
2005-09-19 14:11   ` Patrick Mauritz
2005-09-19 14:37     ` Matthias Urlichs
2005-09-19 16:34     ` Junio C Hamano
2005-09-19 17:40       ` Patrick Mauritz
2005-09-20  6:25         ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).