March 2003 Archives

Mac::Carbon Update

| | Comments (0)
I've been putting some work into Mac::Carbon in the last week or so. Quick highlights:
  • Fixing the problems with GUSI not working for files that don't exist; done except for testing (I hope :-)
  • Trying to get Mac::Carbon to start up faster (not being too successful so far)
  • Porting Mac::AppleEvents::Simple (working fine, except for a few things which won't work well on Mac OS X)
  • Putting together a Bundle::Mac::Carbon
I also need to get Mac::Apps::Launch ported, and at some point need to get Mac OS X's Launch Services working.

When all this is done, and maybe before, I'll do Mac::Glue.

I'll provide more details on each of these at some point. I may not get any of it done for a couple of weeks, though, as I am going on a short vacation. use.perl.org

What the frell?

| | Comments (0)
I can dig the whole death thing, but what is with "to be continued"? use.perl.org

True War Objective Met

| | Comments (0)

SSHAgentStartup

| | Comments (0)
SSHAgentStartup is a cool utility that properly starts up an ssh-agent and sets the environment variables for it in your ~/.MacOSX/environment.plist. It worked under Mac OS X 10.1, but broke under Jaguar, and I wrote my own pseudo-replacement, but was rewritten and now works again.

It doesn't set your shell environment, though; so I modified this to output to a file calles .bash_ssh_env, which I then source from .bash_profile.

--- SSHAgentStartupHelper.c.orig        Wed Sep  4 05:49:33 2002
+++ SSHAgentStartupHelper.c     Fri Mar 14 08:55:08 2003
@@ -135,9 +135,12 @@
        }
  }
 
-void startSSHAgent(CFMutableDictionaryRef plist) {
+void startSSHAgent(char* macosxdir, CFMutableDictionaryRef plist) {
        // -s specifies bourne shell output
-       FILE* output = popen("/usr/bin/ssh-agent -s", "r");
+       char cmd[PATH_MAX + 64];
+       snprintf(cmd, PATH_MAX + 64, "/usr/bin/ssh-agent -s | grep -v echo | tee %s/../.bash_ssh_env", macosxdir);
+
+       FILE* output = popen(cmd, "r");
        if (output && plist) {
                int i;
                char* line;
@@ -193,7 +196,7 @@
                }
        }
        if (plist) {
-               startSSHAgent(plist);
+               startSSHAgent(macosxdir, plist);
                writeEnvironmentPlist(aConfigFile, plist);
        }
        return 0;

use.perl.org

Bloom County

| | Comments (0)
I signed up for MyComicsPage ($10 a year). It's pretty sweet, get a ton of comics on my own page, can archive them, etc. But even if I could get those comics elsewhere, how could I pass up the opportunity to get all of Bloom County? That's right, every Bloom County, releasing a week every two days, starting today. Super sweet. use.perl.org

Bundle-Slash-2.31 Released

| | Comments (0)
Bundle-Slash-2.31 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propagate to the various download mirrors.)

Posted using release by brian d foy.

Now Playing: Letter To A John - Ani DiFranco (Living In Clip (Disc 2))

use.perl.org

Mac-OSA-Simple-1.03 Released

| | Comments (0)
Mac-OSA-Simple-1.03 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propagate to the various download mirrors.)

Changes:

* v1.03, Thursday, March 12, 2003
 
   Tests broken mildly on most systems; corrected.

Posted using release by brian d foy. use.perl.org

Mac-OSA-Simple-1.02 Released

| | Comments (0)
Mac-OSA-Simple-1.02 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propagate to the various download mirrors.)

Changes:

* v1.02, Thursday, March 12, 2003
 
   Added Mac OS X support (see Mac::Carbon).
 
   Fixed bug with scripts not being saved in specified resource ID.
 
   Don't save component if request for nonexistent one fails.
 
   Some cleanup.
 
   Changed load_osa_script() arguments.  Second argument no longer is in
   use. Whether it is a file is determined by virtue of it not being a
   Handle object.  Second argument is now resource ID, unless it is 1, in
   which case we assume you are calling with the old parameters.  If you
   really want to save with resource ID of 1, then add a third parameter of
   "1".  Sorry.

Posted using release by brian d foy. use.perl.org

MacPerl 5.8 Progress Redux

| | Comments (0)
Heh, when I built 5.8 the other day, it was the first time since rebuilding my Mac, and I didn't build the latest. Oops.

But the good news is that when I rebuilt it, I had only a few more problems. XS::APItest required an additional symbol in PerlStub, and a few more tests needed porting. On the way, I also found a bug in File::Spec::Unix (in one place it called File::Spec->canonpath instead of $self->canonpath) and lib.pm (_get_dirs($path) was acting on $_ instead of $path).

So basically, all tests pass except for some ExtUtils tests (that have never been ported) and a few tests that break on known MacPerl bugs. There is one other test that's bothering me in Devel::Peek, on a tainted value, which I'll need to figure out at some point.

What does this mean for MacPerl 5.8.0? These tests are just the beginning; I need to make sure the application is working, as well as the Mac:: modules. But hopefully the open issues with it will be taken care of and the beta period will be swift. I do think I am going to wait for 5.8.1 for beta, though. use.perl.org

I Manipulate

| | Comments (0)
Provided without comment:


Does your soul crave center stage?
Have you heard about the latest rage?
Read your Bible at the lightning flash
Get ordained at the thunder crash
Build the kingdom with a cattle prod
Tell the masses it's a message from God
Where the innocent congregate,
I Manipulate

Now Playing: I Manipulate - Steve Taylor (On The Fritz)

use.perl.org

MacPerl 5.8 Progress

| | Comments (0)
Today I did a test build of the current source, and it went well. About 35 new test files were added to the test suite, and most of them pass. There are about five test files that are known to fail on MacPerl, and now seven more are failing, which need to be looked into (another five failed, and I've fixed, and will submit patches on later).

There are still some open bugs preventing MacPerl 5.8 from being released, but at this point, I am certainly going to wait for perl 5.8.1, since it is on the horizion. use.perl.org

Moving Right Along

| | Comments (0)
Now that I have my new system of managing my software in place (using http://rt.cpan.org/ for bugs, http://projects.pudge.net/ for central location of links, http://sf.net/projects/pudge/ for CVS and file downloads, and release to simplify the distribution process), I am moving forward again with development.

Mac::Carbon and MP3::Info have had long-awaited releases, and I am just about ready to release the first port of Mac::OSA::Simple to Mac OS X (as soon as I finish up the tests for it). The changes were minor: a newline issue (OSA scripts are returned by the decompile API with CRs for newlines!) and an issue to work around an open bug in Mac::Carbon (the file routines fail for nonexistent files).

When that is released, I'll do some work on porting Mac::AppleEvents::Simple.

Mac::Carbon could really use some more tests, especially for Mac::Files. Volunteers? :-) Other modules needing tests are Mac::MoreFiles and Mac::Resources. Mac::Sound, Mac::Processes, and Mac::Components have some tests, but could use more. use.perl.org

Mac-Carbon-0.05 Released

| | Comments (0)
Mac-Carbon-0.05 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propogate to the various download mirrors.)

Changes:

* v0.05, 6 March 2003
 
   Bad values for kCreateFolder and kDontCreateFolder (Ken Williams)

Posted using release by brian d foy. use.perl.org

Mac-Carbon-0.04 Released

| | Comments (0)
Mac-Carbon-0.04 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propogate to the various download mirrors.)

Changes:

* v0.04, 6 March 2003
 
   Make AppleEvents with LD=c++ (required for Dec 2002 Dev Tools)
 
   Added a bunch of Carbon-specific constants for Mac::Files
 
   Modified Mac::Speech (Peter N Lewis)
     - GetVoiceDesciption and NewSpeechChannel use default voice
       if no parameter given
     - %Voice hash returns default voice if key is false (undef, '', 0)
     - Added accessor methods for VoiceDescription and VoiceSpec structures
 
   Added Str63 type to typemap
 
   Cleaned up distribution a little

Posted using release by brian d foy. use.perl.org

Pudge's Projects

| | Comments (0)
I've put up a new web page at http://projects.pudge.net/. Recently, I've been doing some project reorganization, and I wanted to use SF.net and the CPAN for file releases, SF.net for CVS, search.cpan.org for documentation/home page, and rt.cpan.org for bug reporting; although, in some cases, there are slight differences (Slash has its own CVS, and Slash and MacPerl are using SF.net for bugs and have their own home page). So the new web page is the central place to get to all the various locations of these things, for each project I work on.

And now that I have brian d foy's release module working, I intend to do some more releases. :-) Mac::Carbon is next, a smallish release primarily for bugfixes and a few upgrades, and then I intend to get on with some Apple events/OSA stuff, and get Mac::Glue working.

As noted previously, MP3::Info 1.02 was just released; I'll come back to ID3v2 tag writing after the rest of this stuff, and it really needs better tests (though they were upgraded significantly for this release). But then again, everything needs better tests.

Now Playing: 99 Luftballons - Nena (Grand Theft Auto: Vice City, Vol. 2: Wave 103)

use.perl.org

brian d foy's release

| | Comments (0)
I am now using brian d foy's release script, with my own modifications. Here's a patch, for anyone who cares. The changes are basically:

  • Determine dist name from make dist output
  • Die if $config data not set
  • Set processor type and file type in config file
  • Allow to continue if CVS check turns up only unknown files
  • Add support for my own journal-posting script
  • Include Changes and README in SF.net posting
  • Clean up a bit, including changing some constant strings to $config values

The only pudge-specific things in the script now are my own personal preference for release name on SF.net ($ver instead of $module-$ver), the addition of the journal stuff, and the inclusion of README (probably OK for most people) and Changes (which fits a specific format, specifically, everything from the first line to the next line that has non-whitespace in the first column) in SF.net.

Also, if anyone cares, the script requires two modules not listed in its Makefile.PL, ConfigReader::Simple and Test::File, both of which fail tests.

Thanks to brian d foy for the script, it is going to save me a lot of pain.

[pudge@bourque src]$ diff -u release-0.10/release release-0.10.mod/release
--- release-0.10/release        Wed Dec 11 17:38:20 2002
+++ release-0.10.mod/release    Sun Mar  2 14:50:10 2003
@@ -2,8 +2,6 @@
  # $Id: release,v 1.20 2002/12/11 22:38:20 comdog Exp $
  use strict;
 
-use lib qw(/usr/local/src/cpan/build/Crypt-SSLeay-0.45/lib );
-
  use CGI qw(-oldstyle_urls);
  use ConfigReader::Simple;
  use LWP::UserAgent;
@@ -14,6 +12,9 @@
  my $Conf  = '.releaserc';
  my $Debug = $ENV{RELEASE_DEBUG} || 0;
 
+my $local  = $ARGV[0];
+my $remote = $ARGV[1] || $ARGV[0];
+
  =head1 NAME
 
  release - upload files to CPAN and SourceForge
@@ -151,6 +152,9 @@
  # read the configuration
  my $config  = ConfigReader::Simple->new( $Conf );
  die "Could not get configuration data\n" unless ref $config;
+for (qw( cpan_user sf_user sf_group_id sf_package_id )) {
+       die "Missing configuration data: $_\n" unless length $config->$_;
+}
 
  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  # set up the globals
@@ -225,6 +229,13 @@
 
  my $messages = `make tardist 2>&1`;
 
+if (!$local)
+       {
+       ($local) = $messages =~ /^gzip.+?\b(\S+\.tar)$/m;
+       $local .= '.gz';
+       $remote = $local;
+       }
+
  print "done\n";
  }
 
@@ -254,17 +265,19 @@
 
  print "Checking state of CVS... ";
 
-my @cvs_update = `cvs update 2>&1`;
+# i don't want cvs update to happen automatically, so added -n -- pudge
+my @cvs_update = `cvs -n update 2>&1`;
  chomp( @cvs_update );
 
-my @cvs_states = qw( C M U A ? );
+my @cvs_states = qw( C M U P A ? );
  my %cvs_state;
  my %message    = (
-       C   => 'These files have conflicts',
-       M   => 'These files have not been checked in',
-       U   => 'These files were missing and have been updated',
-       A   => 'These files were added but not checked in',
-       '?' => q|I don't know about these files|,
+       C    => 'These files have conflicts',
+       M    => 'These files have not been checked in',
+       U    => 'These files need to be updated',
+       P    => 'These files need to be patched',
+       A    => 'These files were added but not checked in',
+       '?'  => q|I don't know about these files|,
        );
 
  foreach my $state ( @cvs_states )
@@ -279,20 +292,27 @@
 
  local $" = "\n\t";
  my $rule = "-" x 50;
-my $count;
+my($count, $question_count);
 
  foreach my $key ( sort keys %cvs_state )
        {
        my $list = $cvs_state{$key};
        next unless @$list;
-       $count += @$list;
+       $count += @$list unless $key eq '?';
+       $question_count += @$list if $key eq '?';
 
-       print "\t$message{$key}\n\t$rule\n\t@$list\n\n";
+       print "\n\t$message{$key}\n\t$rule\n\t@$list\n";
        }
 
-die "\nERROR: CVS is not up-to-date: Can't release files\n"
+die "\nERROR: CVS is not up-to-date ($count files): Can't release files\n"
        if $count;
 
+if ($question_count) {
+       print "\nWARNING: CVS is not up-to-date ($question_count files unknown); ",
+             "continue anwyay? [Ny] " ;
+       die "Exiting\n" unless <> =~ /^[yY]/;
+}
+
  print "CVS up-to-date\n";
  }
 
@@ -303,9 +323,9 @@
 
  my @Sites = qw(pause.perl.org upload.sourceforge.net);
 
-my $local  = $ARGV[0];
-my $remote = $ARGV[1] || $ARGV[0];
  my( $release ) = $remote =~ m/^(.*?)(?:\.tar\.gz)?$/g;
+# i want just the version -- pudge
+$release =~ s/^.+-([\d.]+)$/$1/;
  print "Release name is $release\n";
 
  foreach my $site ( @Sites )
@@ -411,7 +431,8 @@
 
  print $content if $Debug;
 
-if( $content =~ m/welcomes.*comdog/i )
+my $sf_user = $config->sf_user;
+if( $content =~ m/welcomes.*$sf_user/i )
        {
        print "Logged in!\n";
        }
@@ -427,7 +448,7 @@
  # visit the Quick Release System form
  {
  my $request = HTTP::Request->new( GET =>
-       'https://sourceforge.net/project/admin/qrs.php?pa ckage_id=&group_id=36221'
+       'https://sourceforge.net/project/admin/qrs.php?pa ckage_id=&group_id=' . $config->sf_group_id
        );
  $cookies->add_cookie_header( $request );
  print $request->as_string, "-" x 73, "\n" if $Debug;
@@ -439,6 +460,9 @@
  ################################################## ######################
  # release the file
  {
+my @time = localtime();
+my $date = sprintf "%04d-%02d-%02d", $time[5] + 1900, $time[4] + 1, $time[3];
+
  print "Connecting to SourceForge QRS... ";
  my $cgi = CGI->new();
  my $request = HTTP::Request->new( POST =>
@@ -448,13 +472,13 @@
  $cgi->param( 'MAX_FILE_SIZE', 1000000 );
  $cgi->param( 'package_id', $config->sf_package_id  );
  $cgi->param( 'release_name', $release );
-$cgi->param( 'release_date',  '2002-10-08' );
+$cgi->param( 'release_date',  $date );
  $cgi->param( 'status_id', 1 );
  $cgi->param( 'file_name',  $remote );
-$cgi->param( 'type_id', 5002 );
-$cgi->param( 'processor_id', 8000 );
-$cgi->param( 'release_notes', '' );
-$cgi->param( 'release_changes', '' );
+$cgi->param( 'type_id', $config->sf_type_id || 5002 );
+$cgi->param( 'processor_id', $config->sf_processor_id || 8000 );
+$cgi->param( 'release_notes', get_readme() );
+$cgi->param( 'release_changes', get_changes() );
  $cgi->param( 'group_id', $config->sf_group_id );
  $cgi->param( 'preformatted', 1 );
  $cgi->param( 'submit', 'Release File' );
@@ -463,7 +487,7 @@
  $request->content( $cgi->query_string );
 
  $request->header( "Referer",
-       "https://sourceforge.net/project/admin/qrs.php?pa ckage_id=&group_id=36221"
+       "https://sourceforge.net/project/admin/qrs.php?pa ckage_id=&group_id=" . $config->sf_group_id
         );
  print $request->as_string, "\n",  "-" x 73, "\n" if $Debug;
 
@@ -479,4 +503,68 @@
  print "File Released\n";
  }
 
+JOURNAL: {
+print "Submitting to journal... ";
+my $url = submit_useperl_soap();
+if ($url)
+       {
+       print "submitted: $url\n";
+       }
+else
+       {
+       print "unknown error.\n";
+       }
+}
+
  print "Done.\n";
+
+
+sub get_readme {
+       open my $fh, '<README' or return '';
+       my $data = do {
+               local $/;
+               <$fh>;
+       };
+       return $data;
+}
+
+sub get_changes {
+       open my $fh, '<Changes' or return '';
+       my $data = <$fh>;  # get first line
+       while (<$fh>) {
+               if (/^\S/) { # next line beginning with non-whitespace is end
+                       last;
+               }
+               $data .= $_;
+       }
+       return $data;
+}
+
+sub submit_useperl_soap {
+       use File::Temp 'tempfile';
+       my $script = quotemeta(
+               '/Users/pudge/Applications/BBEdit 7.0/BBEdit Support' .
+               '/Unix Support/Unix Filters/use perl submit'
+       );
+
+       my($name) = $remote =~ m/^(.*?)(?:\.tar\.gz)?$/g;
+       my $cpan_url = 'http://www.cpan.org/authors/id/' . $config->cpan_user;
+       my $sf_url = 'http://sourceforge.net/project/showfiles.php?grou p_id=' . $config->sf_group_id;
+       my $changes = get_changes();
+
+       my($fh, $filename) = tempfile();
+       print $fh <<EOT;
+$name Released
+$name has been released.  Download it from <A HREF="$cpan_url">the CPAN</A> or <A HREF="$sf_url">SF.net</A>.
+
+(Note: it may take time for the release to propogate to the various download mirrors.)
+
+Changes:
+$changes
+EOT
+
+       chomp(my $output = (`cat $filename | $script 2>&1`)[-1]);
+       return $output;
+}
+
+__END__

use.perl.org

MP3-Info-1.02 Released

| | Comments (0)
MP3-Info-1.02 has been released. Download it from the CPAN or SF.net.

Changes:
* v1.02, Sunday, March 2, 2003

      Fix broken argument parsing for use_mp3_utf8. (Ben Gertzfield)

      Document that UTF8 can be access in ":all" export tag. (Ben Gertzfield)

      Better document for new() method.

      Add can() method. (Ken Williams)

      Stick failure warnings in $@. (Jeffrey Friedl)

      Added support for reasonable data from ID3v2 tags with RAW_V2 == 2.
      (brian d foy and others)

      Deal with broken iTunes comment frames in ID3v2.3.0/2.4.0. (Many users)

      remove_mp3tag() was reporting 128 bytes removed even if no bytes were
      removed. (scfc_de @ SF.net)

      Allow calling methods on objects where tag does not exist (e.g., don't fail
      if there is no comment but you call $mp3->comment).

      Various bugfixes. use.perl.org
<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Archive

This page is an archive of entries from March 2003 listed from newest to oldest.

February 2003 is the previous archive.

April 2003 is the next archive.

Find recent content on the main index or look in the archives to find all content.