Thread: [Perlgssapi-developer] http://search.cpan.org/~agrolms/GSSAPI-0.14/GSSAPI.pm
Brought to you by:
achimgrolms
From: Achim G. <per...@gr...> - 2006-02-06 19:53:52
|
I have uploaded 0.14. I think that this is a first "make footprint" release, and more releases have to follow from Changes file: 0.14 Mo Feb 6 18:46:21 CET 2006 -Maintanace overtaken by Achim Grolms. Thank you Philip! our base is <http://perlgssapi.sourceforge.net/> -deleted gss_mech_set_krb5_v1v2(), gss_mech_set_krb5_v2() from OID__Set.xs. It makes the compile fail -deleted gss_mech_krb5_v2() from OID.xs -deletd gss_mech_set_krb5_v2, gss_mech_set_krb5_v1v2 from GSSAPI.xs -gss_str_to_oid() and gss_oid_to_str() are not present in Heimdal implementations. I've ifdefed them to croak. Testsuite is adjusted to skip them. -Added patches from Merijn Broeren to typemap file. this fixes (hopefully) http://rt.cpan.org/Public/Bug/Display.html?id=5681 Just grep the file for "Merijn", I've marked the sections -Added destructor to Cred.xs (Thanks Merijn!) Thank you, Achim |
From: Merijn B. <me...@il...> - 2006-02-08 11:37:18
Attachments:
Makefile.PL.diff
|
Quoting Achim Grolms (per...@gr...): > I have uploaded 0.14. > > I think that this is a first "make footprint" release, > and more releases have to follow > Great, thanks again for picking this up. I've got an issue with the build process now. I like very much that I can pass an argument to Makefile.PL which is used to find the kerberos libraries. But for me this is right now not working, for two reasons. One to do with MakeMaker and one with our subtle setup. Here is the output of Makefile.PL right now: Searching krb5-config command...//ms/dist/kerberos/PROJ/mitkrb5/1.4-lib-prod/bin/krb5-config using GSSAPI implementation Kerberos 5 release 1.4.3 Using libconfiguration -L/ms/dist/kerberos/PROJ/mitkrb5/1.4.3-ms0/.exec/ia32.linux.2.4.lib6/lib -Wl,-rpath -Wl,/ms/dist/kerberos/PROJ/mitkrb5/1.4.3-ms0/.exec/ia32.linux.2.4.lib6/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv Setting MIT defines using own defines Checking if your kit is complete... Looks good Unrecognized argument in LIBS ignored: '-Wl,-rpath' Unrecognized argument in LIBS ignored: '-Wl,/ms/dist/kerberos/PROJ/mitkrb5/1.4.3-ms0/.exec/ia32.linux.2.4.lib6/lib' Writing Makefile for GSSAPI Which seems quite reasonable. Except that I want to use 1.4-lib-prod, which is a symlink to the actual version 1.4.3-ms0. This symlink can be changed at a later date, so I don't have to recompile the perl GSSAPI module if I want to address a bug for instance. The krb5-config is too specific (I could change that ofcourse). This is debatable and I can agree it is just my problem to deal with. The second problem is more of an issue, the ignoring if the -Wl arguments. These are needed at link time, otherwise I don't get a proper runpath. I can set these using LDDLFLAGS as well as LIBS in WriteMakefile. So I propose a mechanism that allows me (and probably other control freaks) to set the LIBS, INC and LDDLFLAGS directly. See attached patch. Any objections? Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Leif J. <le...@it...> - 2006-02-08 12:03:28
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Merijn Broeren wrote: > Quoting Achim Grolms (per...@gr...): >> I have uploaded 0.14. >> >> I think that this is a first "make footprint" release, >> and more releases have to follow >> > Great, thanks again for picking this up. > > I've got an issue with the build process now. I like very much that I > can pass an argument to Makefile.PL which is used to find the kerberos > libraries. But for me this is right now not working, for two reasons. > One to do with MakeMaker and one with our subtle setup. > > Here is the output of Makefile.PL right now: > > Searching krb5-config > command...//ms/dist/kerberos/PROJ/mitkrb5/1.4-lib-prod/bin/krb5-config > using GSSAPI implementation Kerberos 5 release 1.4.3 > > Using libconfiguration > -L/ms/dist/kerberos/PROJ/mitkrb5/1.4.3-ms0/.exec/ia32.linux.2.4.lib6/lib > -Wl,-rpath > -Wl,/ms/dist/kerberos/PROJ/mitkrb5/1.4.3-ms0/.exec/ia32.linux.2.4.lib6/lib > -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv > > Setting MIT defines > > using own defines > > Checking if your kit is complete... > Looks good > Unrecognized argument in LIBS ignored: '-Wl,-rpath' > Unrecognized argument in LIBS ignored: '-Wl,/ms/dist/kerberos/PROJ/mitkrb5/1.4.3-ms0/.exec/ia32.linux.2.4.lib6/lib' > Writing Makefile for GSSAPI > > Which seems quite reasonable. Except that I want to use 1.4-lib-prod, > which is a symlink to the actual version 1.4.3-ms0. This symlink can be > changed at a later date, so I don't have to recompile the perl GSSAPI > module if I want to address a bug for instance. The krb5-config is too > specific (I could change that ofcourse). This is debatable and I can > agree it is just my problem to deal with. > > The second problem is more of an issue, the ignoring if the -Wl > arguments. These are needed at link time, otherwise I don't get a proper > runpath. I can set these using LDDLFLAGS as well as LIBS in > WriteMakefile. > > So I propose a mechanism that allows me (and probably other control > freaks) to set the LIBS, INC and LDDLFLAGS directly. See attached patch. > Any objections? I think it is a good ide although as a person who also does his own software packaging I should warn you that second-guessing the linker that way is a loaded gun pointed at your foot. But you already know that :-) I say go ahead! MVH leifj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD6d318Jx8FtbMZncRAreOAJ46udSOCRHYAOHIdskheRV25rl6PgCdFSfp K9gXppen/m79LhIGZJ5BP28= =fDd+ -----END PGP SIGNATURE----- |
From: Merijn B. <me...@il...> - 2006-02-08 12:12:25
|
Quoting Leif Johansson (le...@it...): > > I think it is a good ide although as a person who also does his own > software packaging I should warn you that second-guessing the linker > that way is a loaded gun pointed at your foot. But you already know > that :-) > Well, I'm not trying to second guess the linker, just exactly doing what krb5-config says. Sadly MakeMaker ignores the -W flags, so you have to put them in LDDLFLAGS. It's easier if everything comes out of /usr/lib or /usr/local/lib but in my specific case we don't use that. Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Leif J. <le...@it...> - 2006-02-08 12:19:00
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Merijn Broeren wrote: > Quoting Leif Johansson (le...@it...): >> I think it is a good ide although as a person who also does his own >> software packaging I should warn you that second-guessing the linker >> that way is a loaded gun pointed at your foot. But you already know >> that :-) >> > Well, I'm not trying to second guess the linker, just exactly doing what > krb5-config says. Sadly MakeMaker ignores the -W flags, so you have to > put them in LDDLFLAGS. It's easier if everything comes out of /usr/lib > or /usr/local/lib but in my specific case we don't use that. > > Cheers, Right - I was referring to the symbolic links you mentioned to get around having to rebuild dependencies on (in this case) kerberos when you rebuild kerberos. MVH leifj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD6eGq8Jx8FtbMZncRAgnjAJ98tRZUe6V+ltd0ZFv0qNyI+c8z/QCgxvgq QRnXBu56tQ60+pUegMRgYuc= =1KtE -----END PGP SIGNATURE----- |
From: Merijn B. <me...@il...> - 2006-02-08 12:32:15
|
Quoting Leif Johansson (le...@it...): > > Right - I was referring to the symbolic links you mentioned to get > around having to rebuild dependencies on (in this case) kerberos > when you rebuild kerberos. > Oh yeah ofcourse, the ABI can be incompatible and actually is between MIT Kerberos 1.2, 1.3 and 1.4. But minor revision numbers so far have not been an issue. I make the Perl module available in multiple versions as well, and incorporate the MIT release in the overal version. So it will be GSSAPI 0.15-1.4 for example. Too much detail :-) Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Achim G. <per...@gr...> - 2006-02-08 19:08:13
|
On Wednesday 08 February 2006 12:36, Merijn Broeren wrote: > The second problem is more of an issue, the ignoring if the -Wl > arguments. I know, I am thinking on the same problem (ignored linkerparameters) > These are needed at link time, otherwise I don't get a proper > runpath. I can set these using LDDLFLAGS as well as LIBS in > WriteMakefile. My (first shot) idea was to pass the output of a) kr5-config --libs gssapi not only to LIBS but also to WriteMakefile( LIBS => join (' ', @GSSLIBS), LLDDLFLAGS => join (' ', @GSSLIBS), . . . ) or b) split the ouput of kr5-config --libs gssapi to options that LIBS understands (@libs) and options to passed to LLDDLFLAGS (@others) or (@libs, @others) (That makes the warning go away) #-------------------------------------------- sub find_libs_in_krb5config_string { my ( $confstringstring ) = @_; my (@libs, @others); foreach ( split ' ', $confstringstring ) { if ( m/(-[Ll][^ ]+)/) { push @libs, $1 } else { push @others, $_; } } return (\@libs, \@others); } #-------------------------------------------- Does this help with the 2nd problem? |
From: Merijn B. <me...@il...> - 2006-02-09 09:29:18
|
Quoting Achim Grolms (per...@gr...): > > My (first shot) idea was to pass the output of > > a) > > kr5-config --libs gssapi > > not only to LIBS but also to > > > WriteMakefile( > LIBS => join (' ', @GSSLIBS), > LLDDLFLAGS => join (' ', @GSSLIBS), > . > . > . > That will work, but you will get duplication on the link line (ugly) and the warnings from MakeMaker about ignoring (ugly). So on grounds of beauty I'd not be inclined to hack it that way. > ) > > or > > b) > > split the ouput of > kr5-config --libs gssapi > > to options that LIBS understands (@libs) > and options to passed to LLDDLFLAGS > (@others) or (@libs, @others) > That would be a nice solution. I haven't actually looked at the code that does the IGNOREing, it might let more pass then just -L. It would be a good solution for everybody that uses krb5-config. I still would like the specific overrides as well though :-) Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Achim G. <per...@gr...> - 2006-02-09 11:28:27
|
On Thursday 09 February 2006 10:29, Merijn Broeren wrote: > Quoting Achim Grolms (per...@gr...): > > split the ouput of > > kr5-config --libs gssapi > > > > to options that LIBS understands (@libs) > > and options to passed to LLDDLFLAGS > > (@others) or (@libs, @others) > > That would be a nice solution. I haven't actually looked at the code > that does the IGNOREing, it might let more pass then just -L. If you do so - please let me know if I have to change the RegEx ( m/(-[Ll][^ ]+)/) that divides the options into @LIBS and @LLDDLFLAGS. Thank you, Achim |
From: Merijn B. <me...@il...> - 2006-02-09 13:38:57
|
Quoting Achim Grolms (per...@gr...): > On Thursday 09 February 2006 10:29, Merijn Broeren wrote: > > Quoting Achim Grolms (per...@gr...): > > > > split the ouput of > > > kr5-config --libs gssapi > > > > > > to options that LIBS understands (@libs) > > > and options to passed to LLDDLFLAGS > > > (@others) or (@libs, @others) > > > > That would be a nice solution. I haven't actually looked at the code > > that does the IGNOREing, it might let more pass then just -L. > > If you do so - please let me know if I have to change the RegEx > ( m/(-[Ll][^ ]+)/) > > that divides the options into @LIBS and @LLDDLFLAGS. > Well, the code looks like this : # Handle possible linker path arguments. if ($thislib =~ s/^(-[LR]|-Wl,-R)//){ # save path flag type my($ptype) = $1; unless (-d $thislib){ warn "$ptype$thislib ignored, directory does not exist\n" if $verbose; next; } my($rtype) = $ptype; if (($ptype eq '-R') or ($ptype eq '-Wl,-R')) { if ($Config{'lddlflags'} =~ /-Wl,-R/) { $rtype = '-Wl,-R'; } elsif ($Config{'lddlflags'} =~ /-R/) { $rtype = '-R'; } } unless (File::Spec->file_name_is_absolute($thislib)) { warn "Warning: $ptype$thislib changed to $ptype$pwd/$thislib\n"; $thislib = $self->catdir($pwd,$thislib); } push(@searchpath, $thislib); push(@extralibs, "$ptype$thislib"); push(@ldloadlibs, "$rtype$thislib"); next; } # Handle possible library arguments. unless ($thislib =~ s/^-l//){ warn "Unrecognized argument in LIBS ignored: '$thislib'\n"; next; } And I can think of several problems with this code. I'm not too thrilled to see that it strips out runpaths that do not exist at the time of configuration. This would be a very normal thing for me to do. It alllow for -R and for -Wl,-R, so it should in my opinion also allow for -Wl,-rpath -Wl,. But since it splits on space that might be a bit more interesting. I'll send a mail to perl5-porters, see what they say. Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Achim G. <per...@gr...> - 2006-02-09 16:38:16
Attachments:
Makefile.PL.diff
|
On Thursday 09 February 2006 10:29, Merijn Broeren wrote: > > split the ouput of > > kr5-config --libs gssapi > > > > to options that LIBS understands (@libs) > > and options to passed to LLDDLFLAGS > > (@others) or (@libs, @others) > > That would be a nice solution. Find attached the patch of my solution. (Can you test if that works for you?) @Merijn: on some of my Testing platform its was a problem setting LDDFLAGS and ignoring Installationdefault from $Config{lddlflags}. So my setting of LDDFLAGS becomes if ( @{$otherparm} > 0 ) { my $lddflagstring = join ' ', $Config{lddlflags}, @{$otherparm}; print "\n using LDDLFLAGS $lddflagstring"; push @LDDLFLAGS, 'LDDLFLAGS', $lddflagstring , } I think $Config{lddlflags} should be added to your if ($options{gssapi_lddlflags}) { push @LDDLFLAGS, 'LDDLFLAGS', $options{gssapi_lddlflags} } Do you agree? Achim |
From: Merijn B. <me...@il...> - 2006-02-09 16:53:45
|
Quoting Achim Grolms (per...@gr...): > > Find attached the patch of my solution. > (Can you test if that works for you?) > Will do tomorrow morning... > > on some of my Testing platform its was a problem > setting LDDFLAGS and ignoring Installationdefault from > $Config{lddlflags}. > That makes sense. That makes sense. > > if ($options{gssapi_lddlflags}) { > push @LDDLFLAGS, 'LDDLFLAGS', $options{gssapi_lddlflags} > } > > Do you agree? > Yes indeed. Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Achim G. <per...@gr...> - 2006-02-09 17:03:34
|
On Thursday 09 February 2006 17:53, Merijn Broeren wrote: > Quoting Achim Grolms (per...@gr...): > > Find attached the patch of my solution. > > (Can you test if that works for you?) > > Will do tomorrow morning... BTW: if -L is present in krb5-config --libs gssapi (like in "-L/usr/lib -Wl,-rpath -Wl,/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv") - has the -L/usr/lib to be passed to LDDLFLAGS too or it is ok to pass it only to LIBS (like my actual version does?) Or has the complete output of krb5-config --libs gssapi to be in LDDLFLAGS? Thank you, Achim |
From: Merijn B. <me...@il...> - 2006-02-09 19:48:15
|
Quoting Achim Grolms (per...@gr...): > On Thursday 09 February 2006 17:53, Merijn Broeren wrote: > > Quoting Achim Grolms (per...@gr...): > > > Find attached the patch of my solution. > > > (Can you test if that works for you?) > > > > Will do tomorrow morning... > > BTW: > if -L is present in krb5-config --libs gssapi > (like in "-L/usr/lib -Wl,-rpath -Wl,/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto > -lcom_err -lresolv") - > > has the -L/usr/lib to be passed to LDDLFLAGS too or it is ok > to pass it only to LIBS (like my actual version does?) > > Or has the complete output of krb5-config --libs gssapi > to be in LDDLFLAGS? > No, I'd follow the logic of ExtUtils, so split all the -L, -R, -l stuff into LIBS and the rest into LDDLFLAGS, together with the flags from Config. In any case, if it doesn't work out for someone they can always fine tune it by bypassing krb5-config using the precise arguments. Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Achim G. <per...@gr...> - 2006-02-09 21:59:20
|
On Thursday 09 February 2006 20:48, Merijn Broeren wrote: > No, I'd follow the logic of ExtUtils, so split all the -L, -R, -l stuff > into LIBS and the rest into LDDLFLAGS, together with the flags from > Config. That makes my splitter looks like this: #------------------------------------------------- sub find_libs_in_krb5config_string { my ( $confstringstring ) = @_; my (@libs, @others); foreach ( split ' ', $confstringstring ) { if ( m/(-(Wl,-R|[LlR])[^ ]*)/) { push @libs, $1 } else { push @others, $_; } } return (\@libs, \@others); } #------------------------------------------------- with @others passed to LDDLFLAGS. On my Slowlaris test that puts -z (from krb5-config output) into LDDLFLAGS. Using LDDLFLAGS -z combreloc -z text -z ignore Should -z a) better be ignored or b) bypassed to LDDLFLAGS? (My code does (b) now) Thank you, Achim |
From: Merijn B. <me...@il...> - 2006-02-09 23:12:02
|
Quoting Achim Grolms (per...@gr...): > That makes my splitter looks like this: > > #------------------------------------------------- > sub find_libs_in_krb5config_string { > my ( $confstringstring ) = @_; > my (@libs, @others); > foreach ( split ' ', $confstringstring ) { > if ( m/(-(Wl,-R|[LlR])[^ ]*)/) { > push @libs, $1 > } else { > push @others, $_; > } > } > return (\@libs, \@others); > } > #------------------------------------------------- > > with @others passed to LDDLFLAGS. > That looks fine. > On my Slowlaris test that puts -z (from krb5-config output) into LDDLFLAGS. > > Using LDDLFLAGS -z combreloc -z text -z ignore > > Should -z > > a) better be ignored > > or > > b) bypassed to LDDLFLAGS? > > (My code does (b) now) > I'd go with b). It is an interesting question though, since those are the options that were used to build the gssapi C library. Some of them might not be applicable to the Perl library. I just had a look at the man page for Solaris ld and for example '-z ignore' is the opposite of default linker behaviour. Mmmm. In most all cases the options should be fine, so just pass them through. Cheers, -- Merijn Broeren | Sometime in the middle ages, God got fed up with us Software Geek | and put earth at sol.milky-way.univ in his kill-file. | Pray all you want, it just gets junked. |
From: Achim G. <per...@gr...> - 2006-02-10 00:56:29
|
On Friday 10 February 2006 00:11, Merijn Broeren wrote: > > b) bypassed to LDDLFLAGS? > > > > (My code does (b) now) > > I'd go with b). That is implemented in GSSAPI-0.16 on CPAN from Changes file: 0.16 -changed Context.xs Destructor to warn only on GSS_S_FAILURE (see <http://sourceforge.net/mailarchive/forum.php?thread_id=9674417&forum_id=47637>) -Makefile.PL passes all the (needed!) krb5-config --libs gssapi stuff that is ignored by LIBS to LDDLFLGAS -Tried to add userdocumentation to GSSAPI.pm (GSSAPI::Name) |