From bitserf at gmail.com Sat Nov 6 05:32:35 2004 From: bitserf at gmail.com (leon breedt) Date: Sat Nov 6 05:32:39 2004 Subject: [Rpa-base-devel] file cache and acquirer Message-ID: <270bd0c404110602321577ae7f@mail.gmail.com> hi, i've committed the beginnings of a file cache and file acquirer, PackageCache will be a specialization of FileCache (we need svn commit mails): lib/rpa/cache.rb <-- FileCache lib/rpa/acquire.rb <-- FileAcquirer they're created as default services on the top-level environment, RPA#fetch_file has been updated to use them. if you need resumed and cached downloads, add a FileAcquirer service, and instantiate it with a FileCache pointing at the right location as first argument. also, you now get satoru's ProgressBar for free if you use an acquirer (even indirectly through RPA#fetch_file) [ljb@thael]:...jects/rpa-base $ sudo rpa install objectgraph Installing ports Getting port objectgraph from http://rpa-base.rubyforge.org/ports/objectgraph_1.0.1-1.rps. Downloading: 100% |########################| 7.5KB 10.6KB/s Time: 00:00:00 i'm of the opinion we need to start using a .rps cache as well? if your build fails, for some reason, and you try again, it does the whole download again, currently. it should use a cache and be resumable, and this is simple: * create :sourceacquirer service in the Environment, and point it at our source package cache register(:sourceacquirer) do RPA::FileAcquirer.new(RPA::FileCache.new(File.join(base.pkgcachedir, 'source'))) end - use this service when you need to retrieve .rps files: env.sourceacquirer.acquire(url) do |io| # io points at local copy in cache io.read end comments? leon From batsman.geo at yahoo.com Sat Nov 6 09:52:28 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Sat Nov 6 09:54:55 2004 Subject: [Rpa-base-devel] file cache and acquirer In-Reply-To: <270bd0c404110602321577ae7f@mail.gmail.com> References: <270bd0c404110602321577ae7f@mail.gmail.com> Message-ID: <20041106145228.GA28114@student.ei.uni-stuttgart.de> On Sat, Nov 06, 2004 at 11:32:35PM +1300, leon breedt wrote: > hi, > > i've committed the beginnings of a file cache and file acquirer, > PackageCache will be a specialization of FileCache (we need svn commit > mails): > > lib/rpa/cache.rb <-- FileCache > lib/rpa/acquire.rb <-- FileAcquirer > > they're created as default services on the top-level environment, > RPA#fetch_file has been updated to use them. > > if you need resumed and cached downloads, add a FileAcquirer service, > and instantiate it with a FileCache pointing at the right location as > first argument. > > also, you now get satoru's ProgressBar for free if you use an acquirer > (even indirectly through RPA#fetch_file) > > > [ljb@thael]:...jects/rpa-base $ sudo rpa install objectgraph > Installing ports > Getting port objectgraph from > http://rpa-base.rubyforge.org/ports/objectgraph_1.0.1-1.rps. > Downloading: 100% |########################| 7.5KB 10.6KB/s Time: 00:00:00 > > > i'm of the opinion we need to start using a .rps cache as well? Sure. The reason why it wasn't done before was that the cache functionality obviously had to be factored out... It fits the current service model perfectly so it's definitely the way to go. > if your build fails, for some reason, and you try again, it does the > whole download again, currently. it should use a cache and be > resumable, and this is simple: > > * create :sourceacquirer service in the Environment, and point it at > our source package cache > > register(:sourceacquirer) do > RPA::FileAcquirer.new(RPA::FileCache.new(File.join(base.pkgcachedir, > 'source'))) > end > > - use this service when you need to retrieve .rps files: > > env.sourceacquirer.acquire(url) do |io| > # io points at local copy in cache > io.read > end > > comments? Implemented it following on your indications, plz take a look to make sure I didn't screw it up in the process. Now LocalInstallation uses the portacquirer service in #install_from_port, and #get_port calls Port#download which uses portacquirer too. There's some redundancy here: Port#download is probably pointless; or maybe the other way around, the logic in #install_from_port should be transferred to the Port class. Also PackageCache has become more or less useless now; the only good property it still has over the newer cache system is that it writes atomically. I will probably modify RPA::FileCache to make it just as powerful. -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From batsman.geo at yahoo.com Sat Nov 6 10:09:27 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Sat Nov 6 10:09:29 2004 Subject: [Rpa-base-devel] file cache and acquirer In-Reply-To: <20041106145228.GA28114@student.ei.uni-stuttgart.de> References: <270bd0c404110602321577ae7f@mail.gmail.com> <20041106145228.GA28114@student.ei.uni-stuttgart.de> Message-ID: <20041106150927.GA28729@student.ei.uni-stuttgart.de> On Sat, Nov 06, 2004 at 03:52:28PM +0100, Mauricio Fern?ndez wrote: > Now LocalInstallation uses the portacquirer service in > #install_from_port, and #get_port calls Port#download which uses > portacquirer too. There's some redundancy here: Port#download is > probably pointless; or maybe the other way around, the logic in > #install_from_port should be transferred to the Port class. > > Also PackageCache has become more or less useless now; the only good > property it still has over the newer cache system is that it writes > atomically. I will probably modify RPA::FileCache to make it just as > powerful. On second thought, PackageCache should stay because it should have extra logic to make sure the packages are the right ones (platform, ABI, etc); FileCache needs not know anything about those higher-level issues. -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From bitserf at gmail.com Sun Nov 7 02:55:24 2004 From: bitserf at gmail.com (leon breedt) Date: Sun Nov 7 02:55:34 2004 Subject: [Rpa-base-devel] port metadata, signing, ports-based binary packages and 'rpa changes' Message-ID: <270bd0c404110623556a9b6908@mail.gmail.com> hi, metadata -------------- implementation of the resumable downloads, exposed the fact that we don't have enough metadata currently about the files we retrieve. in order to support resumption correctly, we need to have a manifest containing filesize and md5 for each port. i was thinking perhaps some of this data could reside in the available file. for ports provided by us, we should require that this data be present, however, we could probably relax this requirement if they're installing something from an arbitrary URL, with the appropriate warnings emitted. signing ---------- there are two concerns here, as i see it. 1) signing of the manifest data (available file) 2) signing of the package file (.rps or .rpa) never having investigated this in depth, my take is to just sign the metadata.gz file in the package, and have a metadata.gz.asc file. objections? i have some code lying around in the dead Xeraph project that speaks the GnuPG protocol and has keyring management and verification support, so i could port that. eek, interested in your take on this? ports-based binary packages ------------------------------------------ i've discussed this on and off, but i'd like to get more details on how Eivind sees this working on FreeBSD. generating a Makefile with bsd.rpa.mk? would it be useful to call into RPA at a fine-grained level, or are tasks like "build" and "install" sufficient? the externally visible API has slidden a bit since we're probably not going to need it for Debian (Ruby debian/rules), but i don't want to get too deep into the above side projects and leave source-based platforms in the lurch. changes command ---------------------------- users might like to see a list of the user-visible changes since the last RPA release. i propose an 'rpa changes' command with a pretty changelog. leon From eivind at FreeBSD.ORG Mon Nov 8 09:32:38 2004 From: eivind at FreeBSD.ORG (Eivind Eklund) Date: Mon Nov 8 09:32:35 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <270bd0c404110623556a9b6908@mail.gmail.com> References: <270bd0c404110623556a9b6908@mail.gmail.com> Message-ID: <20041108143238.GC35988@FreeBSD.org> On Sun, Nov 07, 2004 at 08:55:24PM +1300, leon breedt wrote: > hi, > > metadata > -------------- > > implementation of the resumable downloads, exposed the fact that we > don't have enough metadata currently about the files we retrieve. > > in order to support resumption correctly, we need to have a manifest > containing filesize and md5 for each port. > > i was thinking perhaps some of this data could reside in the available file. > > for ports provided by us, we should require that this data be present, > however, we could probably relax this requirement if they're > installing something from an arbitrary URL, with the appropriate > warnings emitted. I think we should always require it. Let's just make it easy to generate. I've got bad experiences with going "sloppy" - it adds a little bit of complexity at a time to the code, and suddenly the codebase is hard to debug and hard to change. > signing > ---------- > > there are two concerns here, as i see it. > > 1) signing of the manifest data (available file) > > 2) signing of the package file (.rps or .rpa) > > never having investigated this in depth, my take is to just sign the > metadata.gz file in the package, and have a metadata.gz.asc file. > objections? I think this is good, except I see no reason to compress the metadata inside the already compressed archive. This adds complexity and will slow down overall processing. > i have some code lying around in the dead Xeraph project that speaks > the GnuPG protocol and has keyring management and verification > support, so i could port that. > > eek, interested in your take on this? I think hooking into the PGP web of trust is a good idea. The only embellishment I see is that I'd like the manifest to be at the start of the tar file, as that allows streaming and filtering of tar files while still checking signatures as you touch the data. This is only important for features we do not yet have, so we should only do the embellishment if it is very little work. > ports-based binary packages > ------------------------------------------ > > i've discussed this on and off, but i'd like to get more details on > how Eivind sees this working on FreeBSD. > > generating a Makefile with bsd.rpa.mk? > > would it be useful to call into RPA at a fine-grained level, or are > tasks like "build" and "install" sufficient? FreeBSD divides an install/repackage into the following phases: # config - Configure options for this port (using ${DIALOG}). # Automatically run prior to extract, patch, configure, build, # install, and package. # extract - Unpacks ${DISTFILES} into ${WRKDIR}. # patch - Apply any provided patches to the source. # configure - Runs either GNU configure, one or more local configure # scripts or nothing, depending on what's available. # build - Actually compile the sources. # install - Install the results of a build. # package - Create a package from an _installed_ port. I don't think there is any need for fine-grained hooks for this. > changes command > ---------------------------- > > users might like to see a list of the user-visible changes since the > last RPA release. i propose an 'rpa changes' command with a pretty > changelog. I think this is a good idea, and something we should support with time, but it will be a noticable amount of work to maintain. Mauricio, what do you think? Eivind. From horacio.lopez at gmail.com Mon Nov 8 10:15:57 2004 From: horacio.lopez at gmail.com (vruz) Date: Mon Nov 8 10:15:54 2004 Subject: [Rpa-base-devel] PING Message-ID: <6b809bd8041108071554439c18@mail.gmail.com> hello all, "is there anybody out there ?" how do I get a list of the previous messages I missed ? cheers, vruz From batsman.geo at yahoo.com Mon Nov 8 10:52:27 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Mon Nov 8 10:52:31 2004 Subject: [Rpa-base-devel] PING In-Reply-To: <6b809bd8041108071554439c18@mail.gmail.com> References: <6b809bd8041108071554439c18@mail.gmail.com> Message-ID: <20041108155227.GA29917@student.ei.uni-stuttgart.de> On Mon, Nov 08, 2004 at 10:15:57AM -0500, vruz wrote: > hello all, > > "is there anybody out there ?" 4 subscribers so far, I think :P > how do I get a list of the previous messages I missed ? http://rubyforge.org/pipermail/rpa-base-devel/ -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From batsman.geo at yahoo.com Mon Nov 8 11:36:15 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Mon Nov 8 11:36:15 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <20041108143238.GC35988@FreeBSD.org> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> Message-ID: <20041108163615.GA30144@student.ei.uni-stuttgart.de> On Mon, Nov 08, 2004 at 02:32:38PM +0000, Eivind Eklund wrote: > On Sun, Nov 07, 2004 at 08:55:24PM +1300, leon breedt wrote: > > implementation of the resumable downloads, exposed the fact that we > > don't have enough metadata currently about the files we retrieve. > > > > in order to support resumption correctly, we need to have a manifest > > containing filesize and md5 for each port. > > > > i was thinking perhaps some of this data could reside in the available file. > > > > for ports provided by us, we should require that this data be present, > > however, we could probably relax this requirement if they're > > installing something from an arbitrary URL, with the appropriate > > warnings emitted. > > I think we should always require it. Let's just make it easy to generate. > I've got bad experiences with going "sloppy" - it adds a little bit of > complexity at a time to the code, and suddenly the codebase is hard to > debug and hard to change. When downloading a port/package from some repos, the information would be available in the ports.info file (or equivalent), but should we really require ppl to generate a myport.asc for the corresponding myport.rps? > > signing > > ---------- > > > > there are two concerns here, as i see it. > > > > 1) signing of the manifest data (available file) > > > > 2) signing of the package file (.rps or .rpa) > > > > never having investigated this in depth, my take is to just sign the > > metadata.gz file in the package, and have a metadata.gz.asc file. > > objections? > > I think this is good, except I see no reason to compress the metadata > inside the already compressed archive. This adds complexity and will > slow down overall processing. The archive is not actually compressed, the format is tar( "data.tar.gz" => gzip(tar(data files)), "metadata.gz" => gzip(metadata)) If we want the signature of metadata.gz to be valid for the whole package/port, the metadata needs to have the digest of data.tar.gz too. > > i have some code lying around in the dead Xeraph project that speaks > > the GnuPG protocol and has keyring management and verification > > support, so i could port that. > > > > eek, interested in your take on this? > > I think hooking into the PGP web of trust is a good idea. The only problem I could see when I played with openssl was getting it to use gnupg's keys. It's not that bad if we need gnupg to sign, but signature verification must be built into rpa-base, with no external deps (besides openssl or maybe mbignum, since we can distribute them in binary form for win32). > The only embellishment I see is that I'd like the manifest to be at the > start of the tar file, metadata.gz is at the end for the very same reason, so the port/package can be made in a single pass, without intermediate files. > as that allows streaming and filtering of tar > files while still checking signatures as you touch the data. This is > only important for features we do not yet have, so we should only do > the embellishment if it is very little work. Not hard to do, but I'd wait until something else needs it because there's a price to pay for that... > > would it be useful to call into RPA at a fine-grained level, or are > > tasks like "build" and "install" sufficient? > > FreeBSD divides an install/repackage into the following phases: > # config - Configure options for this port (using ${DIALOG}). > # Automatically run prior to extract, patch, configure, build, > # install, and package. > # extract - Unpacks ${DISTFILES} into ${WRKDIR}. > # patch - Apply any provided patches to the source. > # configure - Runs either GNU configure, one or more local configure > # scripts or nothing, depending on what's available. > # build - Actually compile the sources. > # install - Install the results of a build. > # package - Create a package from an _installed_ port. We don't have a patch phase yet --- the .rps contains the RPAfied tree. I've wanted to do that for some time but we're still missing pure-Ruby tools for that (patch, etc). > > changes command > > ---------------------------- > > > > users might like to see a list of the user-visible changes since the > > last RPA release. i propose an 'rpa changes' command with a pretty > > changelog. > > I think this is a good idea, and something we should support with time, but > it will be a noticable amount of work to maintain. > > Mauricio, what do you think? The whole RPA release scheme still needs some work; right now it's not really possible to have ports from different RPA releases installed at a time (unless there's no file conflict of course). I think the solution will involve symlinks or managed copies (win32). When that is working we could develop some protocol to aggregate the changelog information from all installed ports. -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From eivind at FreeBSD.ORG Tue Nov 9 07:47:32 2004 From: eivind at FreeBSD.ORG (Eivind Eklund) Date: Tue Nov 9 07:47:50 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <20041108163615.GA30144@student.ei.uni-stuttgart.de> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> <20041108163615.GA30144@student.ei.uni-stuttgart.de> Message-ID: <20041109124732.GB85416@FreeBSD.org> On Mon, Nov 08, 2004 at 05:36:15PM +0100, Mauricio Fern?ndez wrote: > On Mon, Nov 08, 2004 at 02:32:38PM +0000, Eivind Eklund wrote: > > On Sun, Nov 07, 2004 at 08:55:24PM +1300, leon breedt wrote: > > > implementation of the resumable downloads, exposed the fact that we > > > don't have enough metadata currently about the files we retrieve. > > > > > > in order to support resumption correctly, we need to have a manifest > > > containing filesize and md5 for each port. > > > > > > i was thinking perhaps some of this data could reside in the available file. > > > > > > for ports provided by us, we should require that this data be present, > > > however, we could probably relax this requirement if they're > > > installing something from an arbitrary URL, with the appropriate > > > warnings emitted. > > > > I think we should always require it. Let's just make it easy to generate. > > I've got bad experiences with going "sloppy" - it adds a little bit of > > complexity at a time to the code, and suddenly the codebase is hard to > > debug and hard to change. > > When downloading a port/package from some repos, the information would > be available in the ports.info file (or equivalent), but should we > really require ppl to generate a myport.asc for the corresponding > myport.rps? No. I mean that we should have a manifest for all packages, and from what you write below we already do. I also think (depending on the work involved) that the signatures should be included in our package format, not as detached files. > > > signing > > > ---------- > > > > > > there are two concerns here, as i see it. > > > > > > 1) signing of the manifest data (available file) > > > > > > 2) signing of the package file (.rps or .rpa) > > > > > > never having investigated this in depth, my take is to just sign the > > > metadata.gz file in the package, and have a metadata.gz.asc file. > > > objections? > > > > I think this is good, except I see no reason to compress the metadata > > inside the already compressed archive. This adds complexity and will > > slow down overall processing. > > The archive is not actually compressed, the format is > > tar( "data.tar.gz" => gzip(tar(data files)), > "metadata.gz" => gzip(metadata)) > > If we want the signature of metadata.gz to be valid for the whole > package/port, the metadata needs to have the digest of data.tar.gz too. Hmmm. Either that, or SHA1 of the files inside it. I'd sort of like to record the MD5s of files we install to be able to verify that the files presently on the system are identical to the ones RPA installed originally. Being able to do security checks from the installed files to the archive without significant processing would be a bonus. Ref my earlier comments about placing the metadata first in the package: This is not particularly important in the scheme we actually use (as opposed to what I thought we used), as a plain tar AFAIK is searchable, and the relevant protocols allow partial downloads. > > > i have some code lying around in the dead Xeraph project that speaks > > > the GnuPG protocol and has keyring management and verification > > > support, so i could port that. > > > > > > eek, interested in your take on this? > > > > I think hooking into the PGP web of trust is a good idea. > > The only problem I could see when I played with openssl was getting it > to use gnupg's keys. It's not that bad if we need gnupg to sign, but > signature verification must be built into rpa-base, with no external deps > (besides openssl or maybe mbignum, since we can distribute them in binary > form for win32). Leon, do I read you correct above if I read it as your code solve this problem? > > > would it be useful to call into RPA at a fine-grained level, or are > > > tasks like "build" and "install" sufficient? > > > > FreeBSD divides an install/repackage into the following phases: > > # config - Configure options for this port (using ${DIALOG}). > > # Automatically run prior to extract, patch, configure, build, > > # install, and package. > > # extract - Unpacks ${DISTFILES} into ${WRKDIR}. > > # patch - Apply any provided patches to the source. > > # configure - Runs either GNU configure, one or more local configure > > # scripts or nothing, depending on what's available. > > # build - Actually compile the sources. > > # install - Install the results of a build. > > # package - Create a package from an _installed_ port. > > We don't have a patch phase yet --- the .rps contains the RPAfied tree. > I've wanted to do that for some time but we're still missing pure-Ruby > tools for that (patch, etc). I don't think this is critical. The reason FreeBSD does it is that we use original author tarballs because CVS imports and CVS branches were too expensive/inconvenient. The good side of the FreeBSD technique is that it makes it fairly easy for users to do local updates and thus get involved in FreeBSD ports development. And I think we can solve that through our other infrastructure; ports are limited by implementation language (BSD make, which is the best make language for this kind of thing I know, but it's still an utter pain to deal with), CVS, and is a design that was made for the machinery that was ten years ago and has since been slowly evolved. > > > changes command > > > ---------------------------- > > > > > > users might like to see a list of the user-visible changes since the > > > last RPA release. i propose an 'rpa changes' command with a pretty > > > changelog. > > > > I think this is a good idea, and something we should support with time, but > > it will be a noticable amount of work to maintain. > > > > Mauricio, what do you think? > > The whole RPA release scheme still needs some work; right now it's not > really possible to have ports from different RPA releases installed at > a time (unless there's no file conflict of course). I think the solution > will involve symlinks or managed copies (win32). > When that is working we could develop some protocol to aggregate > the changelog information from all installed ports. I think we need to add significant metadata to the changelog, indicating what is important in various forms, but allowing access to the rest of the information. However, this is probably best done iteratively. Eivind. From batsman.geo at yahoo.com Tue Nov 9 08:50:17 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Tue Nov 9 08:50:15 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <20041109124732.GB85416@FreeBSD.org> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> <20041108163615.GA30144@student.ei.uni-stuttgart.de> <20041109124732.GB85416@FreeBSD.org> Message-ID: <20041109135017.GA24030@student.ei.uni-stuttgart.de> On Tue, Nov 09, 2004 at 12:47:32PM +0000, Eivind Eklund wrote: > > When downloading a port/package from some repos, the information would > > be available in the ports.info file (or equivalent), but should we > > really require ppl to generate a myport.asc for the corresponding > > myport.rps? > > No. I mean that we should have a manifest for all packages, and from > what you write below we already do. I also think (depending on the work > involved) that the signatures should be included in our package format, > not as detached files. It can easily be included in the "outer" tarball: remember that the port/package format is > > tar( "data.tar.gz" => gzip(tar(data files)), > > "metadata.gz" => gzip(metadata)) we can add another top-level entry containing the signed digest of the others. > > If we want the signature of metadata.gz to be valid for the whole > > package/port, the metadata needs to have the digest of data.tar.gz too. > > Hmmm. Either that, or SHA1 of the files inside it. I'd sort of like to record I'd prefer taking the digest of the tarball as a whole because then we don't need to handle special cases like symlinks (which we might use in the future, with automatic expansion on win32), etc... Also, taking only the digest of the files would fail to secure the permissions, ids, etc... > the MD5s of files we install to be able to verify that the files presently on > the system are identical to the ones RPA installed originally. Being able to > do security checks from the installed files to the archive without significant > processing would be a bonus. The metadata.gz of .rpa packages does carry the MD5 digests of the files contained in the package. It is possible atm. to rpa check portname which will report if any of the files associated to the corresponding package have been modified. > Ref my earlier comments about placing the metadata first in the package: This > is not particularly important in the scheme we actually use (as opposed to what > I thought we used), as a plain tar AFAIK is searchable, and the relevant > protocols allow partial downloads. Having it at the beginning still allows us to dl just a chunk and discard the rest of the package/port. Of course, that information could be made available somewhere else (as is the case with the current ports.info that carries all the metadata associated to a port). -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From eivind at FreeBSD.ORG Tue Nov 9 09:08:26 2004 From: eivind at FreeBSD.ORG (Eivind Eklund) Date: Tue Nov 9 09:09:52 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <20041109135017.GA24030@student.ei.uni-stuttgart.de> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> <20041108163615.GA30144@student.ei.uni-stuttgart.de> <20041109124732.GB85416@FreeBSD.org> <20041109135017.GA24030@student.ei.uni-stuttgart.de> Message-ID: <20041109140826.GC85416@FreeBSD.org> On Tue, Nov 09, 2004 at 02:50:17PM +0100, Mauricio Fern?ndez wrote: > On Tue, Nov 09, 2004 at 12:47:32PM +0000, Eivind Eklund wrote: > > > When downloading a port/package from some repos, the information would > > > be available in the ports.info file (or equivalent), but should we > > > really require ppl to generate a myport.asc for the corresponding > > > myport.rps? > > > > No. I mean that we should have a manifest for all packages, and from > > what you write below we already do. I also think (depending on the work > > involved) that the signatures should be included in our package format, > > not as detached files. > > It can easily be included in the "outer" tarball: > remember that the port/package format is > > > > tar( "data.tar.gz" => gzip(tar(data files)), > > > "metadata.gz" => gzip(metadata)) > > we can add another top-level entry containing the signed digest of the others. Another top-level entry was what I meant above. I think this is the way to go. > > > If we want the signature of metadata.gz to be valid for the whole > > > package/port, the metadata needs to have the digest of data.tar.gz too. > > > > Hmmm. Either that, or SHA1 of the files inside it. I'd sort of like to record > > I'd prefer taking the digest of the tarball as a whole because then > we don't need to handle special cases like symlinks (which we might use > in the future, with automatic expansion on win32), etc... > Also, taking only the digest of the files would fail to secure the > permissions, ids, etc... I actually meant to include that too in the manifest in that case, but when thinking about it once more, I think it's probably work that's no point in doing. It is a change that will be fairly easy to do if we need to do it, and implementing it now is just a waste of resources. So: Just checksum the parts as indicated above. > > the MD5s of files we install to be able to verify that the files presently on > > the system are identical to the ones RPA installed originally. Being able to > > do security checks from the installed files to the archive without significant > > processing would be a bonus. > > The metadata.gz of .rpa packages does carry the MD5 digests of the > files contained in the package. It is possible atm. to > > rpa check portname > > which will report if any of the files associated to the corresponding > package have been modified. :-) > > Ref my earlier comments about placing the metadata first in the package: This > > is not particularly important in the scheme we actually use (as opposed to what > > I thought we used), as a plain tar AFAIK is searchable, and the relevant > > protocols allow partial downloads. > > Having it at the beginning still allows us to dl just a chunk and discard > the rest of the package/port. Yeah, but isn't it also possible to just DL the first chunk, then use that to find where the metadata is, and then download the metadata? Given that the outer tar is uncompressed? Eivind. From batsman.geo at yahoo.com Tue Nov 9 09:21:29 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Tue Nov 9 09:21:27 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <20041109140826.GC85416@FreeBSD.org> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> <20041108163615.GA30144@student.ei.uni-stuttgart.de> <20041109124732.GB85416@FreeBSD.org> <20041109135017.GA24030@student.ei.uni-stuttgart.de> <20041109140826.GC85416@FreeBSD.org> Message-ID: <20041109142129.GA26033@student.ei.uni-stuttgart.de> On Tue, Nov 09, 2004 at 02:08:26PM +0000, Eivind Eklund wrote: > Yeah, but isn't it also possible to just DL the first chunk, then use that to > find where the metadata is, and then download the metadata? Given that the > outer tar is uncompressed? Sure; I was just thinking of servers w/ no support for Range:. We can most probably ignore that for the time being, and it would be easy to correct anyway. -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From bitserf at gmail.com Tue Nov 9 16:11:39 2004 From: bitserf at gmail.com (leon breedt) Date: Tue Nov 9 16:11:43 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <20041109124732.GB85416@FreeBSD.org> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> <20041108163615.GA30144@student.ei.uni-stuttgart.de> <20041109124732.GB85416@FreeBSD.org> Message-ID: <270bd0c4041109131170a34d6e@mail.gmail.com> On Tue, 9 Nov 2004 12:47:32 +0000, Eivind Eklund wrote: > > > I think hooking into the PGP web of trust is a good idea. > > > > The only problem I could see when I played with openssl was getting it > > to use gnupg's keys. It's not that bad if we need gnupg to sign, but > > signature verification must be built into rpa-base, with no external deps > > (besides openssl or maybe mbignum, since we can distribute them in binary > > form for win32). > > Leon, do I read you correct above if I read it as your code solve > this problem? No, unfortunately it calls an external GnuPG executable to perform the actual work. I'm not exactly sure how one would use OpenSSL to verify GnuPG signatures? I can investigate if this is possible. At the same time, if it isn't, I'm not sure that its worth the effort to try for a pure-Ruby implementation of GnuPG? I'm no crypto expert :) > > > > users might like to see a list of the user-visible changes since the > > > > last RPA release. i propose an 'rpa changes' command with a pretty > > > > changelog. > > > > > > I think this is a good idea, and something we should support with time, but > > > it will be a noticable amount of work to maintain. > > > > > > Mauricio, what do you think? hmm, i actually meant a list of user-visible changes for rpa-base, not on a per-package level, just yet :) From batsman.geo at yahoo.com Tue Nov 9 18:42:48 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Tue Nov 9 18:42:43 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <270bd0c4041109131170a34d6e@mail.gmail.com> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> <20041108163615.GA30144@student.ei.uni-stuttgart.de> <20041109124732.GB85416@FreeBSD.org> <270bd0c4041109131170a34d6e@mail.gmail.com> Message-ID: <20041109234248.GA5263@student.ei.uni-stuttgart.de> On Wed, Nov 10, 2004 at 10:11:39AM +1300, leon breedt wrote: > On Tue, 9 Nov 2004 12:47:32 +0000, Eivind Eklund wrote: > > > > I think hooking into the PGP web of trust is a good idea. > > > > > > The only problem I could see when I played with openssl was getting it > > > to use gnupg's keys. It's not that bad if we need gnupg to sign, but > > > signature verification must be built into rpa-base, with no external deps > > > (besides openssl or maybe mbignum, since we can distribute them in binary > > > form for win32). > > > > Leon, do I read you correct above if I read it as your code solve > > this problem? > No, unfortunately it calls an external GnuPG executable to perform the > actual work. :-(( > I'm not exactly sure how one would use OpenSSL to verify > GnuPG signatures? IIRC they used different formats for the keys (although the textual format looked similar). I'll research some more. > I can investigate if this is possible. At the same > time, if it isn't, I'm not sure that its worth the effort to try for a > pure-Ruby implementation of GnuPG? I'm no crypto expert :) There's already a pure-Ruby RSA implementation... it just relies on MBignum (an extension) and the author (Evan Webb) is quite busy atm., I hear... that's quite a pity, since at some point in time there were even discussions on ruby-core about substituting Ruby's Bignum with MBignum. > > > > > users might like to see a list of the user-visible changes since the > > > > > last RPA release. i propose an 'rpa changes' command with a pretty > > > > > changelog. > > > > > > > > I think this is a good idea, and something we should support with time, but > > > > it will be a noticable amount of work to maintain. > > > > > > > > Mauricio, what do you think? > hmm, i actually meant a list of user-visible changes for rpa-base, not > on a per-package level, just yet :) heh, that's trivial :P -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From eivind at FreeBSD.org Wed Nov 10 05:04:30 2004 From: eivind at FreeBSD.org (Eivind Eklund) Date: Wed Nov 10 05:04:41 2004 Subject: [Rpa-base-devel] Re: port metadata, signing, ports-based binary packages and 'rpa changes' In-Reply-To: <20041109234248.GA5263@student.ei.uni-stuttgart.de> References: <270bd0c404110623556a9b6908@mail.gmail.com> <20041108143238.GC35988@FreeBSD.org> <20041108163615.GA30144@student.ei.uni-stuttgart.de> <20041109124732.GB85416@FreeBSD.org> <270bd0c4041109131170a34d6e@mail.gmail.com> <20041109234248.GA5263@student.ei.uni-stuttgart.de> Message-ID: <20041110100430.GA7241@FreeBSD.org> On Wed, Nov 10, 2004 at 12:42:48AM +0100, Mauricio Fern?ndez wrote: > On Wed, Nov 10, 2004 at 10:11:39AM +1300, leon breedt wrote: > > I'm not exactly sure how one would use OpenSSL to verify > > GnuPG signatures? > > IIRC they used different formats for the keys (although the textual > format looked similar). I'll research some more. They use different formats for the keys, and a different trust model. Effectively, you'd end up with needing to extract the RSA or DSA key and use just the OpenSSL crypto implementations. However, I don't think this buys much on the verification side - the problem will be the format munging, not the actual crypto. > > I can investigate if this is possible. At the same > > time, if it isn't, I'm not sure that its worth the effort to try for a > > pure-Ruby implementation of GnuPG? I'm no crypto expert :) > > There's already a pure-Ruby RSA implementation... it just relies on > MBignum (an extension) and the author (Evan Webb) is quite busy atm., I > hear... that's quite a pity, since at some point in time there were even > discussions on ruby-core about substituting Ruby's Bignum with MBignum. I can do a pure-Ruby verifier for RSA in one line of code, I think. It won't be fast, but it will almost certainly be fast enough. As I said above: The problem is dealing with the external data formats. I think verification of Diffie-Hellman signatures is fairly easy, too, but it is somewhat more contorted than plain RSA (because Diffie-Hellman is really a key exchange protocol.) Eivind. From batsman.geo at yahoo.com Wed Nov 10 08:37:23 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Wed Nov 10 08:37:17 2004 Subject: [Rpa-base-devel] Transition to the new Subversion repository Message-ID: <20041110133723.GA2296@student.ei.uni-stuttgart.de> I got a svn dump of the current repository (http://www.wobblini.net/svn/rpa/) up to revision 1122. The new repository will hopefully be working soon, which means we will no longer have to (ab)use dblack's server. Changesets after 1122 might have to be committed manually to the newer repository. If really needed, I could ask dblack to svn dump it again for us, but I'd rather avoid that (don't want to keep bothering him :). -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From eivind at FreeBSD.org Wed Nov 10 09:25:09 2004 From: eivind at FreeBSD.org (Eivind Eklund) Date: Wed Nov 10 09:25:17 2004 Subject: [Rpa-base-devel] Though: Mirrors will be desynced and go backwards in time Message-ID: <20041110142509.GA8888@FreeBSD.org> If/when we introduce mirror support: Mirrors *will* get desynced and move backwards in time when they have disk crashes and the admins restore from backup. The primary norwegian CPAN mirror has been flapping back and forth (*by half a year*) this way a bit, and as "whatever I get from CPAN is newer than what I have locally" this means that our perl packages have been getting downgraded to half-a-year old versions. In RPA, we should try to avoid this. Eivind. From batsman.geo at yahoo.com Wed Nov 10 11:12:17 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Wed Nov 10 11:12:13 2004 Subject: [Rpa-base-devel] Though: Mirrors will be desynced and go backwards in time In-Reply-To: <20041110142509.GA8888@FreeBSD.org> References: <20041110142509.GA8888@FreeBSD.org> Message-ID: <20041110161217.GA10159@student.ei.uni-stuttgart.de> On Wed, Nov 10, 2004 at 02:25:09PM +0000, Eivind Eklund wrote: > If/when we introduce mirror support: Mirrors *will* get desynced and > move backwards in time when they have disk crashes and the admins > restore from backup. > > The primary norwegian CPAN mirror has been flapping back and forth > (*by half a year*) this way a bit, and as "whatever I get from CPAN is > newer than what I have locally" this means that our perl packages have > been getting downgraded to half-a-year old versions. > > In RPA, we should try to avoid this. Leon's idea of a separate (strict API + RPA revision) version number for all the packages is growing on me. Some ideas to be stolen from Conary too... -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From eivind at FreeBSD.org Wed Nov 10 11:48:52 2004 From: eivind at FreeBSD.org (Eivind Eklund) Date: Wed Nov 10 11:49:02 2004 Subject: [Rpa-base-devel] Though: Mirrors will be desynced and go backwards in time In-Reply-To: <20041110161217.GA10159@student.ei.uni-stuttgart.de> References: <20041110142509.GA8888@FreeBSD.org> <20041110161217.GA10159@student.ei.uni-stuttgart.de> Message-ID: <20041110164852.GC8888@FreeBSD.org> On Wed, Nov 10, 2004 at 05:12:17PM +0100, Mauricio Fern?ndez wrote: > On Wed, Nov 10, 2004 at 02:25:09PM +0000, Eivind Eklund wrote: > > If/when we introduce mirror support: Mirrors *will* get desynced and > > move backwards in time when they have disk crashes and the admins > > restore from backup. > > > > The primary norwegian CPAN mirror has been flapping back and forth > > (*by half a year*) this way a bit, and as "whatever I get from CPAN is > > newer than what I have locally" this means that our perl packages have > > been getting downgraded to half-a-year old versions. > > > > In RPA, we should try to avoid this. > > Leon's idea of a separate (strict API + RPA revision) version number > for all the packages is growing on me. I sort of like this. The only issue I see is that it would be nice to not have to re-download all packages just because the RPA revision changes, if the packages in themselves do not. Eivind. From eivind at FreeBSD.org Wed Nov 10 12:05:16 2004 From: eivind at FreeBSD.org (Eivind Eklund) Date: Wed Nov 10 12:05:27 2004 Subject: [Rpa-base-devel] Experience points Message-ID: <20041110170516.GD8888@FreeBSD.org> I just looked over the update rate for Everything2 (a wiki-like website). This rate is presently roughly 1/20th of what it was before one particular change, and after that it seemed to start declining immediately. You see, Everything 2 uses an experience and level system similar to role playing games, with new powers coming with higher experience ratings. They did a change to the experience system that made many interesting people feel it was hard to get higher levels - and thus said people dropped out. I find this quite interesting, and I wonder if we can exploit something similar for RPA. Experience points has one very good feature: They give continual feeling of progress, and the levels give goals that people strive for. The only problem I see is that it may seem "not so serious", but I don't think that will matter if we actually show results :-) Things that we could give out points for: - Submitting a new port - Submitting a PR with a fix - Submitting an update to a port - Reviewing a port - Answering a question in a mailing list - Committing a PR to the system - Extra bonus for submitting stuff that others vote as good - General bonus from the gamemasters :-) Stuff we could give out for various levels: - "Homepage" at www.rubyarchive.org - E-mail-address @rubyarchive.org - Commit privileges - Voting privileges for some form of decision making process - Listing in a "honour roll" - Prioritization of bug reports - Ability to vote stuff as good - Ability to negate other's changes and the XP from them - Cash from our sponsors :-) Eivind. From batsman.geo at yahoo.com Wed Nov 10 12:05:34 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Wed Nov 10 12:05:29 2004 Subject: [Rpa-base-devel] Though: Mirrors will be desynced and go backwards in time In-Reply-To: <20041110164852.GC8888@FreeBSD.org> References: <20041110142509.GA8888@FreeBSD.org> <20041110161217.GA10159@student.ei.uni-stuttgart.de> <20041110164852.GC8888@FreeBSD.org> Message-ID: <20041110170534.GA13530@student.ei.uni-stuttgart.de> On Wed, Nov 10, 2004 at 04:48:52PM +0000, Eivind Eklund wrote: > On Wed, Nov 10, 2004 at 05:12:17PM +0100, Mauricio Fern?ndez wrote: > > On Wed, Nov 10, 2004 at 02:25:09PM +0000, Eivind Eklund wrote: > > > If/when we introduce mirror support: Mirrors *will* get desynced and > > > move backwards in time when they have disk crashes and the admins > > > restore from backup. > > > > > > The primary norwegian CPAN mirror has been flapping back and forth > > > (*by half a year*) this way a bit, and as "whatever I get from CPAN is > > > newer than what I have locally" this means that our perl packages have > > > been getting downgraded to half-a-year old versions. > > > > > > In RPA, we should try to avoid this. > > > > Leon's idea of a separate (strict API + RPA revision) version number > > for all the packages is growing on me. > > I sort of like this. The only issue I see is that it would be nice to > not have to re-download all packages just because the RPA revision > changes, if the packages in themselves do not. Wouldn't happen if/when rpa-base understands RPA releases as just sets of compatible ports/packages and is able to handle them accordingly (with symlinks or managed copies). -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From batsman.geo at yahoo.com Wed Nov 10 17:55:07 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Wed Nov 10 17:55:01 2004 Subject: [Rpa-base-devel] Transition to the new Subversion repository In-Reply-To: <20041110133723.GA2296@student.ei.uni-stuttgart.de> References: <20041110133723.GA2296@student.ei.uni-stuttgart.de> Message-ID: <20041110225507.GA21067@student.ei.uni-stuttgart.de> On Wed, Nov 10, 2004 at 02:37:23PM +0100, Mauricio Fern?ndez wrote: > I got a svn dump of the current repository > (http://www.wobblini.net/svn/rpa/) up to revision 1122. > The new repository will hopefully be working soon, which > means we will no longer have to (ab)use dblack's server. > Changesets after 1122 might have to be committed manually > to the newer repository. If really needed, I could ask > dblack to svn dump it again for us, but I'd rather avoid > that (don't want to keep bothering him :). The new repository (http://svn.rubyarchive.org) is working. Kudos to Aredridel! Please contact her to get ci access. Happy hacking, -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From batsman.geo at yahoo.com Wed Nov 10 19:21:28 2004 From: batsman.geo at yahoo.com (Mauricio =?iso-8859-1?Q?Fern=E1ndez?=) Date: Wed Nov 10 19:21:21 2004 Subject: [Rpa-base-devel] Commit msgs Message-ID: <20041111002128.GA21987@student.ei.uni-stuttgart.de> ... are now forwarded to this list. enjoy -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/ From bitserf at gmail.com Wed Nov 10 19:36:19 2004 From: bitserf at gmail.com (leon breedt) Date: Wed Nov 10 19:36:11 2004 Subject: [Rpa-base-devel] Transition to the new Subversion repository In-Reply-To: <20041110225507.GA21067@student.ei.uni-stuttgart.de> References: <20041110133723.GA2296@student.ei.uni-stuttgart.de> <20041110225507.GA21067@student.ei.uni-stuttgart.de> Message-ID: <270bd0c40411101636e4e2814@mail.gmail.com> On Wed, 10 Nov 2004 23:55:07 +0100, Mauricio Fern?ndez wrote: > The new repository (http://svn.rubyarchive.org) is working. Kudos to > Aredridel! Excellent :) Perhaps we could use Trac as a BTS (it has SVN integration) until we have something homegrown? http://trac.edgewall.com Leon From commitlog at rubyarchive.org Thu Nov 11 06:30:15 2004 From: commitlog at rubyarchive.org (commitlog@rubyarchive.org) Date: Thu Nov 11 06:30:10 2004 Subject: [Rpa-base-devel] r1137 - trunk/ports/RedCloth-3.0.0 Message-ID: Author: batsman Date: 2004-11-11 04:30:12 -0700 (Thu, 11 Nov 2004) New Revision: 1137 Removed: trunk/ports/RedCloth-3.0.0/RedCloth.gemspec trunk/ports/RedCloth-3.0.0/install.rb Log: RPAfying... Deleted: trunk/ports/RedCloth-3.0.0/RedCloth.gemspec =================================================================== --- trunk/ports/RedCloth-3.0.0/RedCloth.gemspec 2004-11-11 11:26:31 UTC (rev 1136) +++ trunk/ports/RedCloth-3.0.0/RedCloth.gemspec 2004-11-11 11:30:12 UTC (rev 1137) @@ -1,52 +0,0 @@ -require 'rubygems' -spec = Gem::Specification.new do |s| - - ## Basic Information - - s.name = 'RedCloth' - s.version = "3.0.0" - s.platform = Gem::Platform::RUBY - s.summary = <<-TXT - RedCloth is a module for using Textile and Markdown in Ruby. Textile and Markdown are text formats. - A very simple text format. Another stab at making readable text that can be converted to HTML. - TXT - s.description = <<-TXT - No need to use verbose HTML to build your docs, your blogs, your pages. Textile gives you readable text while you're writing and beautiful text for your readers. And if you need to break out into HTML, Textile will allow you to do so. - - Textile also handles some subtleties of formatting which will enhance your document's readability: - - * Single- and double-quotes around words or phrases are converted to curly quotations, much easier on - the eye. "Observe!" - - * Double hyphens are replaced with an em-dash. Observe -- very nice! - - * Single hyphens are replaced with en-dashes. Observe - so cute! - - * Triplets of periods become an ellipsis. Observe... - - * The letter 'x' becomes a dimension sign when used alone. Observe: 2 x 2. - - * Conversion of ==(TM)== to (TM), ==(R)== to (R), ==(C)== to (C). - - For more on Textile's language, hop over to "A Textile Reference":http://hobix.com/textile/. For more - on Markdown, see "Daring Fireball's page":http://daringfireball.net/projects/markdown/. - TXT - - ## Include tests, libs, docs - - s.files = ['bin/**/*', 'tests/**/*', 'lib/**/*', 'docs/**/*', 'run-tests.rb'].collect do |dirglob| - Dir.glob(dirglob) - end.flatten.delete_if {|item| item.include?("CVS")} - - ## Load-time details - - s.require_path = 'lib' - s.autorequire = 'redcloth' - - ## Author and project details - - s.author = "Why the Lucky Stiff" - s.email = "why@ruby-lang.org" - s.rubyforge_project = "redcloth" - s.homepage = "http://www.whytheluckystiff.net/ruby/redcloth/" -end Deleted: trunk/ports/RedCloth-3.0.0/install.rb =================================================================== --- trunk/ports/RedCloth-3.0.0/install.rb 2004-11-11 11:26:31 UTC (rev 1136) +++ trunk/ports/RedCloth-3.0.0/install.rb 2004-11-11 11:30:12 UTC (rev 1137) @@ -1,1032 +0,0 @@ -#!/usr/local/bin/ruby -# -# This file is automatically generated. DO NOT MODIFY! -# -# install.rb -# -# Copyright (c) 2000-2002 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU Lesser General Public License version 2. -# - -### begin compat.rb - -unless Enumerable.instance_methods.include? 'inject' then -module Enumerable - def inject( result ) - each do |i| - result = yield(result, i) - end - result - end -end -end - -def File.read_all( fname ) - File.open(fname, 'rb') {|f| return f.read } -end - -def File.write( fname, str ) - File.open(fname, 'wb') {|f| f.write str } -end - -### end compat.rb -### begin config.rb - -if i = ARGV.index(/\A--rbconfig=/) then - file = $' - ARGV.delete_at(i) - require file -else - require 'rbconfig' -end - - -class ConfigTable - - c = ::Config::CONFIG - - rubypath = c['bindir'] + '/' + c['ruby_install_name'] - - major = c['MAJOR'].to_i - minor = c['MINOR'].to_i - teeny = c['TEENY'].to_i - version = "#{major}.#{minor}" - - # ruby ver. >= 1.4.4? - newpath_p = ((major >= 2) or - ((major == 1) and - ((minor >= 5) or - ((minor == 4) and (teeny >= 4))))) - - re = Regexp.new('\A' + Regexp.quote(c['prefix'])) - subprefix = lambda {|path| - re === path and path.sub(re, '$prefix') - } - - if c['rubylibdir'] then - # 1.6.3 < V - stdruby = subprefix.call(c['rubylibdir']) - siteruby = subprefix.call(c['sitedir']) - versite = subprefix.call(c['sitelibdir']) - sodir = subprefix.call(c['sitearchdir']) - elsif newpath_p then - # 1.4.4 <= V <= 1.6.3 - stdruby = "$prefix/lib/ruby/#{version}" - siteruby = subprefix.call(c['sitedir']) - versite = siteruby + '/' + version - sodir = "$site-ruby/#{c['arch']}" - else - # V < 1.4.4 - stdruby = "$prefix/lib/ruby/#{version}" - siteruby = "$prefix/lib/ruby/#{version}/site_ruby" - versite = siteruby - sodir = "$site-ruby/#{c['arch']}" - end - - DESCRIPTER = [ - [ 'prefix', [ c['prefix'], - 'path', - 'path prefix of target environment' ] ], - [ 'std-ruby', [ stdruby, - 'path', - 'the directory for standard ruby libraries' ] ], - [ 'site-ruby-common', [ siteruby, - 'path', - 'the directory for version-independent non-standard ruby libraries' ] ], - [ 'site-ruby', [ versite, - 'path', - 'the directory for non-standard ruby libraries' ] ], - [ 'bin-dir', [ '$prefix/bin', - 'path', - 'the directory for commands' ] ], - [ 'rb-dir', [ '$site-ruby', - 'path', - 'the directory for ruby scripts' ] ], - [ 'so-dir', [ sodir, - 'path', - 'the directory for ruby extentions' ] ], - [ 'data-dir', [ '$prefix/share', - 'path', - 'the directory for shared data' ] ], - [ 'ruby-path', [ rubypath, - 'path', - 'path to set to #! line' ] ], - [ 'ruby-prog', [ rubypath, - 'name', - 'the ruby program using for installation' ] ], - [ 'make-prog', [ 'make', - 'name', - 'the make program to compile ruby extentions' ] ], - [ 'without-ext', [ 'no', - 'yes/no', - 'does not compile/install ruby extentions' ] ] - ] - - SAVE_FILE = 'config.save' - - def ConfigTable.each_name( &block ) - keys().each( &block ) - end - - def ConfigTable.keys - DESCRIPTER.collect {|k,*dummy| k } - end - - def ConfigTable.each_definition( &block ) - DESCRIPTER.each( &block ) - end - - def ConfigTable.get_entry( name ) - name, ent = DESCRIPTER.assoc(name) - ent - end - - def ConfigTable.get_entry!( name ) - get_entry(name) or raise ArgumentError, "no such config: #{name}" - end - - def ConfigTable.add_entry( name, vals ) - ConfigTable::DESCRIPTER.push [name,vals] - end - - def ConfigTable.remove_entry( name ) - get_entry name or raise ArgumentError, "no such config: #{name}" - DESCRIPTER.delete_if {|n,arr| n == name } - end - - def ConfigTable.config_key?( name ) - get_entry(name) ? true : false - end - - def ConfigTable.bool_config?( name ) - ent = get_entry(name) or return false - ent[1] == 'yes/no' - end - - def ConfigTable.value_config?( name ) - ent = get_entry(name) or return false - ent[1] != 'yes/no' - end - - def ConfigTable.path_config?( name ) - ent = get_entry(name) or return false - ent[1] == 'path' - end - - - class << self - - alias newobj new - - def new - c = newobj() - c.__send__ :init - c - end - - def load - c = newobj() - File.file? SAVE_FILE or - raise InstallError, "#{File.basename $0} config first" - File.foreach( SAVE_FILE ) do |line| - k, v = line.split( '=', 2 ) - c.instance_eval { - @table[k] = v.strip - } - end - c - end - - end - - def initialize - @table = {} - end - - def init - DESCRIPTER.each do |k, (default, vname, desc, default2)| - @table[k] = default - end - end - private :init - - def save - File.open( SAVE_FILE, 'w' ) {|f| - @table.each do |k, v| - f.printf "%s=%s\n", k, v if v - end - } - end - - def []=( k, v ) - ConfigTable.config_key? k or raise InstallError, "unknown config option #{k}" - if ConfigTable.path_config? k then - @table[k] = (v[0,1] != '$') ? File.expand_path(v) : v - else - @table[k] = v - end - end - - def []( key ) - @table[key] or return nil - @table[key].gsub( %r<\$([^/]+)> ) { self[$1] } - end - - def set_raw( key, val ) - @table[key] = val - end - - def get_raw( key ) - @table[key] - end - -end - - -class MetaConfigEnvironment - - def self.eval_file( file ) - return unless File.file? file - new.instance_eval File.read_all(file), file, 1 - end - - private - - def config_names - ConfigTable.keys - end - - def config?( name ) - ConfigTable.config_key? name - end - - def bool_config?( name ) - ConfigTable.bool_config? name - end - - def value_config?( name ) - ConfigTable.value_config? name - end - - def path_config?( name ) - ConfigTable.path_config? name - end - - def add_config( name, argname, default, desc ) - ConfigTable.add_entry name,[default,argname,desc] - end - - def add_path_config( name, default, desc ) - add_config name, 'path', default, desc - end - - def add_bool_config( name, default, desc ) - add_config name, 'yes/no', default ? 'yes' : 'no', desc - end - - def set_config_default( name, default ) - if bool_config? name then - ConfigTable.get_entry!(name)[0] = default ? 'yes' : 'no' - else - ConfigTable.get_entry!(name)[0] = default - end - end - - def remove_config( name ) - ent = ConfigTable.get_entry(name) - ConfigTable.remove_entry name - ent - end - -end - -### end config.rb -### begin fileop.rb - -module FileOperations - - def mkdir_p( dname, prefix = nil ) - dname = prefix + dname if prefix - $stderr.puts "mkdir -p #{dname}" if verbose? - return if no_harm? - - # does not check '/'... it's too abnormal case - dirs = dname.split(%r_(?=/)_) - if /\A[a-z]:\z/i === dirs[0] then - disk = dirs.shift - dirs[0] = disk + dirs[0] - end - dirs.each_index do |idx| - path = dirs[0..idx].join('') - Dir.mkdir path unless dir? path - end - end - - def rm_f( fname ) - $stderr.puts "rm -f #{fname}" if verbose? - return if no_harm? - - if File.exist? fname or File.symlink? fname then - File.chmod 0777, fname - File.unlink fname - end - end - - def rm_rf( dn ) - $stderr.puts "rm -rf #{dn}" if verbose? - return if no_harm? - - Dir.chdir dn - Dir.foreach('.') do |fn| - next if fn == '.' - next if fn == '..' - if dir? fn then - verbose_off { - rm_rf fn - } - else - verbose_off { - rm_f fn - } - end - end - Dir.chdir '..' - Dir.rmdir dn - end - - def mv( src, dest ) - rm_f dest - begin - File.link src, dest - rescue - File.write dest, File.read_all(src) - File.chmod File.stat(src).mode, dest - end - rm_f src - end - - def install( from, dest, mode, prefix = nil ) - $stderr.puts "install #{from} #{dest}" if verbose? - return if no_harm? - - realdest = prefix + dest if prefix - if dir? realdest then - realdest += '/' + File.basename(from) - end - str = File.read_all(from) - if diff? str, realdest then - verbose_off { - rm_f realdest if File.exist? realdest - } - File.write realdest, str - File.chmod mode, realdest - - File.open( objdir + '/InstalledFiles', 'a' ) {|f| f.puts realdest } - end - end - - def diff?( orig, targ ) - return true unless File.exist? targ - orig != File.read_all(targ) - end - - def command( str ) - $stderr.puts str if verbose? - system str or raise RuntimeError, "'system #{str}' failed" - end - - def ruby( str ) - command config('ruby-prog') + ' ' + str - end - - def dir?( dname ) - # for corrupted windows stat() - File.directory?( (dname[-1,1] == '/') ? dname : dname + '/' ) - end - - def all_files( dname ) - Dir.open( dname ) {|d| - return d.find_all {|n| File.file? "#{dname}/#{n}" } - } - end - - def all_dirs( dname ) - Dir.open( dname ) {|d| - return d.find_all {|n| dir? "#{dname}/#{n}" } - %w(. ..) - } - end - -end - -### end fileop.rb -### begin base.rb - -class InstallError < StandardError; end - - -class Installer - - Version = '3.1.2' - Copyright = 'Copyright (c) 2000-2002 Minero Aoki' - - - @toplevel = nil - - def self.declear_toplevel_installer( inst ) - @toplevel and - raise ArgumentError, 'more than one toplevel installer decleared' - @toplevel = inst - end - - def self.toplevel_installer - @toplevel - end - - - FILETYPES = %w( bin lib ext data ) - - include FileOperations - - def initialize( config, opt, srcroot, objroot ) - @config = config - @options = opt - @srcdir = File.expand_path(srcroot) - @objdir = File.expand_path(objroot) - @currdir = '.' - end - - def inspect - "#<#{type} #{__id__}>" - end - - # - # configs/options - # - - def get_config( key ) - @config[key] - end - - alias config get_config - - def set_config( key, val ) - @config[key] = val - end - - def no_harm? - @options['no-harm'] - end - - def verbose? - @options['verbose'] - end - - def verbose_off - save, @options['verbose'] = @options['verbose'], false - yield - @options['verbose'] = save - end - - # - # srcdir/objdir - # - - attr_reader :srcdir - alias srcdir_root srcdir - alias package_root srcdir - - def curr_srcdir - "#{@srcdir}/#{@currdir}" - end - - attr_reader :objdir - alias objdir_root objdir - - def curr_objdir - "#{@objdir}/#{@currdir}" - end - - def srcfile( path ) - curr_srcdir + '/' + path - end - - def srcexist?( path ) - File.exist? srcfile(path) - end - - def srcdirectory?( path ) - dir? srcfile(path) - end - - def srcfile?( path ) - File.file? srcfile(path) - end - - def srcentries( path = '.' ) - Dir.open( curr_srcdir + '/' + path ) {|d| - return d.to_a - %w(. ..) - hookfilenames - } - end - - def srcfiles( path = '.' ) - srcentries(path).find_all {|fname| - File.file? File.join(curr_srcdir, path, fname) - } - end - - def srcdirectories( path = '.' ) - srcentries(path).find_all {|fname| - dir? File.join(curr_srcdir, path, fname) - } - end - - def dive_into( rel ) - return unless dir? "#{@srcdir}/#{rel}" - - dir = File.basename(rel) - Dir.mkdir dir unless dir? dir - save = Dir.pwd - Dir.chdir dir - $stderr.puts '---> ' + rel if verbose? - @currdir = rel - yield - Dir.chdir save - $stderr.puts '<--- ' + rel if verbose? - @currdir = File.dirname(rel) - end - - # - # config - # - - def exec_config - exec_task_traverse 'config' - end - - def config_dir_bin( rel ) - end - - def config_dir_lib( rel ) - end - - def config_dir_ext( rel ) - extconf if extdir? curr_srcdir - end - - def extconf - opt = @options['config-opt'].join(' ') - command "#{config('ruby-prog')} #{curr_srcdir}/extconf.rb #{opt}" - end - - def config_dir_data( rel ) - end - - # - # setup - # - - def exec_setup - exec_task_traverse 'setup' - end - - def setup_dir_bin( relpath ) - all_files( curr_srcdir ).each do |fname| - add_rubypath "#{curr_srcdir}/#{fname}" - end - end - - SHEBANG_RE = /\A\#!\s*\S*ruby\S*/ - - def add_rubypath( path ) - $stderr.puts %Q if verbose? - return if no_harm? - - tmpfile = File.basename(path) + '.tmp' - begin - File.open( path ) {|r| - File.open( tmpfile, 'w' ) {|w| - first = r.gets - return unless SHEBANG_RE === first # reject '/usr/bin/env ruby' - - w.print first.sub( SHEBANG_RE, '#!' + config('ruby-path') ) - w.write r.read - } } - mv tmpfile, File.basename(path) - ensure - rm_f tmpfile if File.exist? tmpfile - end - end - - def setup_dir_lib( relpath ) - end - - def setup_dir_ext( relpath ) - if extdir? curr_srcdir then - make - end - end - - def make - command config('make-prog') - end - - def setup_dir_data( relpath ) - end - - # - # install - # - - def exec_install - exec_task_traverse 'install' - end - - def install_dir_bin( rel ) - install_files targfiles, config('bin-dir') + '/' + rel, 0755 - end - - def install_dir_lib( rel ) - install_files targfiles, config('rb-dir') + '/' + rel, 0644 - begin - require 'rdoc/rdoc' - ri_site = true - if RDOC_VERSION =~ /^0\./ - require 'rdoc/options' - unless Options::OptionList::OPTION_LIST.assoc('--ri-site') - ri_site = false - end - end - if ri_site - r = RDoc::RDoc.new - r.document(%w{--ri-site}) - end - rescue - puts "** Unable to install Ri documentation for RedCloth **" - end - end - - def install_dir_ext( rel ) - if extdir? curr_srcdir then - install_dir_ext_main File.dirname(rel) - end - end - - def install_dir_ext_main( rel ) - install_files allext('.'), config('so-dir') + '/' + rel, 0555 - end - - def install_dir_data( rel ) - install_files targfiles, config('data-dir') + '/' + rel, 0644 - end - - def install_files( list, dest, mode ) - mkdir_p dest, @options['install-prefix'] - list.each do |fname| - install fname, dest, mode, @options['install-prefix'] - end - end - - def targfiles - (targfilenames() - hookfilenames()).collect {|fname| - File.exist?(fname) ? fname : File.join(curr_srcdir(), fname) - } - end - - def targfilenames - [ curr_srcdir(), '.' ].inject([]) {|ret, dir| - ret | all_files(dir) - } - end - - def hookfilenames - %w( pre-%s post-%s pre-%s.rb post-%s.rb ).collect {|fmt| - %w( config setup install clean ).collect {|t| sprintf fmt, t } - }.flatten - end - - def allext( dir ) - _allext(dir) or raise InstallError, - "no extention exists: Have you done 'ruby #{$0} setup' ?" - end - - DLEXT = /\.#{ ::Config::CONFIG['DLEXT'] }\z/ - - def _allext( dir ) - Dir.open( dir ) {|d| - return d.find_all {|fname| DLEXT === fname } - } - end - - # - # clean - # - - def exec_clean - exec_task_traverse 'clean' - rm_f 'config.save' - rm_f 'InstalledFiles' - end - - def clean_dir_bin( rel ) - end - - def clean_dir_lib( rel ) - end - - def clean_dir_ext( rel ) - clean - end - - def clean - command config('make-prog') + ' clean' if File.file? 'Makefile' - end - - def clean_dir_data( rel ) - end - - # - # lib - # - - def exec_task_traverse( task ) - run_hook 'pre-' + task - FILETYPES.each do |type| - if config('without-ext') == 'yes' and type == 'ext' then - $stderr.puts 'skipping ext/* by user option' if verbose? - next - end - traverse task, type, task + '_dir_' + type - end - run_hook 'post-' + task - end - - def traverse( task, rel, mid ) - dive_into( rel ) { - run_hook 'pre-' + task - __send__ mid, rel.sub( %r_\A.*?(?:/|\z)_, '' ) - all_dirs( curr_srcdir ).each do |d| - traverse task, rel + '/' + d, mid - end - run_hook 'post-' + task - } - end - - def run_hook( name ) - try_run_hook curr_srcdir + '/' + name or - try_run_hook curr_srcdir + '/' + name + '.rb' - end - - def try_run_hook( fname ) - return false unless File.file? fname - - env = self.dup - begin - env.instance_eval File.read_all(fname), fname, 1 - rescue - raise InstallError, "hook #{fname} failed:\n" + $!.message - end - true - end - - def extdir?( dir ) - File.exist? dir + '/MANIFEST' - end - -end - -### end base.rb -### begin toplevel.rb - -class ToplevelInstaller < Installer - - TASKS = [ - [ 'config', 'saves your configurations' ], - [ 'show', 'shows current configuration' ], - [ 'setup', 'compiles extention or else' ], - [ 'install', 'installs files' ], - [ 'clean', "does `make clean' for each extention" ] - ] - - - def initialize( root ) - super nil, {'verbose' => true}, root, '.' - Installer.declear_toplevel_installer self - end - - - def execute - run_metaconfigs - - case task = parsearg_global() - when 'config' - @config = ConfigTable.new - else - @config = ConfigTable.load - end - parsearg_TASK task - - exectask task - end - - - def run_metaconfigs - MetaConfigEnvironment.eval_file "#{srcdir_root}/#{metaconfig}" - end - - def metaconfig - 'metaconfig' - end - - - def exectask( task ) - if task == 'show' then - exec_show - else - try task - end - end - - def try( task ) - $stderr.printf "#{File.basename $0}: entering %s phase...\n", task if verbose? - begin - __send__ 'exec_' + task - rescue - $stderr.printf "%s failed\n", task - raise - end - $stderr.printf "#{File.basename $0}: %s done.\n", task if verbose? - end - - # - # processing arguments - # - - def parsearg_global - task_re = /\A(?:#{TASKS.collect {|i| i[0] }.join '|'})\z/ - - while arg = ARGV.shift do - case arg - when /\A\w+\z/ - task_re === arg or raise InstallError, "wrong task: #{arg}" - return arg - - when '-q', '--quiet' - @options['verbose'] = false - - when '--verbose' - @options['verbose'] = true - - when '-h', '--help' - print_usage $stdout - exit 0 - - when '-v', '--version' - puts "#{File.basename $0} version #{Version}" - exit 0 - - when '--copyright' - puts Copyright - exit 0 - - else - raise InstallError, "unknown global option '#{arg}'" - end - end - - raise InstallError, 'no task or global option given' - end - - - def parsearg_TASK( task ) - mid = "parsearg_#{task}" - if respond_to? mid, true then - __send__ mid - else - ARGV.empty? or - raise InstallError, "#{task}: unknown options: #{ARGV.join ' '}" - end - end - - def parsearg_config - re = /\A--(#{ConfigTable.keys.join '|'})(?:=(.*))?\z/ - @options['config-opt'] = [] - - while i = ARGV.shift do - if /\A--?\z/ === i then - @options['config-opt'] = ARGV.dup - break - end - m = re.match(i) or raise InstallError, "config: unknown option #{i}" - name, value = m.to_a[1,2] - if value then - if ConfigTable.bool_config?(name) then - /\A(y(es)?|n(o)?|t(rue)?|f(alse))\z/i === value or raise InstallError, "config: --#{name} allows only yes/no for argument" - value = (/\Ay(es)?|\At(rue)/i === value) ? 'yes' : 'no' - end - else - ConfigTable.bool_config?(name) or raise InstallError, "config: --#{name} requires argument" - value = 'yes' - end - @config[name] = value - end - end - - def parsearg_install - @options['no-harm'] = false - @options['install-prefix'] = '' - while a = ARGV.shift do - case a - when /\A--no-harm\z/ - @options['no-harm'] = true - when /\A--prefix=(.*)\z/ - path = $1 - path = File.expand_path(path) unless path[0,1] == '/' - @options['install-prefix'] = path - else - raise InstallError, "install: unknown option #{a}" - end - end - end - - - def print_usage( out ) - out.puts - out.puts 'Usage:' - out.puts " ruby #{File.basename $0} " - out.puts " ruby #{File.basename $0} [] []" - - fmt = " %-20s %s\n" - out.puts - out.puts 'Global options:' - out.printf fmt, '-q,--quiet', 'suppress message outputs' - out.printf fmt, ' --verbose', 'output messages verbosely' - out.printf fmt, '-h,--help', 'print this message' - out.printf fmt, '-v,--version', 'print version and quit' - out.printf fmt, '--copyright', 'print copyright and quit' - - out.puts - out.puts 'Tasks:' - TASKS.each do |name, desc| - out.printf " %-10s %s\n", name, desc - end - - out.puts - out.puts 'Options for config:' - ConfigTable.each_definition do |name, (default, arg, desc, default2)| - out.printf " %-20s %s [%s]\n", - '--'+ name + (ConfigTable.bool_config?(name) ? '' : '='+arg), - desc, - default2 || default - end - out.printf " %-20s %s [%s]\n", - '--rbconfig=path', 'your rbconfig.rb to load', "running ruby's" - - out.puts - out.puts 'Options for install:' - out.printf " %-20s %s [%s]\n", - '--no-harm', 'only display what to do if given', 'off' - - out.puts - end - - # - # config - # - - def exec_config - super - @config.save - end - - # - # show - # - - def exec_show - ConfigTable.each_name do |k| - v = @config.get_raw(k) - if not v or v.empty? then - v = '(not specified)' - end - printf "%-10s %s\n", k, v - end - end - -end - -### end toplevel.rb - -if $0 == __FILE__ then - begin - installer = ToplevelInstaller.new( Dir.pwd ) - installer.execute - rescue - raise if $DEBUG - $stderr.puts $!.message - $stderr.puts "try 'ruby #{$0} --help' for usage" - exit 1 - end -end From commitlog at rubyarchive.org Thu Nov 11 06:34:18 2004 From: commitlog at rubyarchive.org (commitlog@rubyarchive.org) Date: Thu Nov 11 06:34:14 2004 Subject: [Rpa-base-devel] r1138 - trunk/ports/RedCloth-3.0.0 Message-ID: Author: batsman Date: 2004-11-11 04:34:15 -0700 (Thu, 11 Nov 2004) New Revision: 1138 Added: trunk/ports/RedCloth-3.0.0/install.rb Modified: trunk/ports/RedCloth-3.0.0/run-tests.rb Log: RPAfied. Added: trunk/ports/RedCloth-3.0.0/install.rb =================================================================== --- trunk/ports/RedCloth-3.0.0/install.rb 2004-11-11 11:30:12 UTC (rev 1137) +++ trunk/ports/RedCloth-3.0.0/install.rb 2004-11-11 11:34:15 UTC (rev 1138) @@ -0,0 +1,21 @@ +require 'rpa/install' + +class Install_redcloth < RPA::Install::FullInstaller + name "redcloth" + version "3.0.0-1" + classification Library + build do + installtests %w[run-tests.rb] + installtests "tests", "tests" + end + description < References: <20041110133723.GA2296@student.ei.uni-stuttgart.de> <20041110225507.GA21067@student.ei.uni-stuttgart.de> <270bd0c40411101636e4e2814@mail.gmail.com> Message-ID: <20041111140508.GB34804@FreeBSD.org> On Thu, Nov 11, 2004 at 01:36:19PM +1300, leon breedt wrote: > On Wed, 10 Nov 2004 23:55:07 +0100, Mauricio Fern?ndez > wrote: > > The new repository (http://svn.rubyarchive.org) is working. Kudos to > > Aredridel! > Excellent :) > > Perhaps we could use Trac as a BTS (it has SVN integration) until we > have something homegrown? > > http://trac.edgewall.com I cannot find much about the SVN integration; it just looks like a single interface to a non-integrated bug tracking system and version contrl system? Have you used Trac and can give more background on it? One thing I noticed is that it seems to miss the ability to receive mail directly, and for tracking dependencies between tickets. Both of these has turned out to be important for places I've worked - I don't know if they are immediately critical to RPA, but I think they'll become important as soon as we start really needing the tracking system... Eivind. From commitlog at rubyarchive.org Thu Nov 11 16:09:35 2004 From: commitlog at rubyarchive.org (commitlog@rubyarchive.org) Date: Thu Nov 11 16:09:32 2004 Subject: [Rpa-base-devel] r1139 - trunk/ports/iowa_0.9.2 Message-ID: Author: batsman Date: 2004-11-11 14:09:32 -0700 (Thu, 11 Nov 2004) New Revision: 1139 Modified: trunk/ports/iowa_0.9.2/install.rb Log: Declare the dependency on tmail. Modified: trunk/ports/iowa_0.9.2/install.rb =================================================================== --- trunk/ports/iowa_0.9.2/install.rb 2004-11-11 11:34:15 UTC (rev 1138) +++ trunk/ports/iowa_0.9.2/install.rb 2004-11-11 21:09:32 UTC (rev 1139) @@ -4,7 +4,8 @@ class Install_iowa < RPA::Install::FullInstaller name "iowa" requires 'log4r' - version "0.9.2-1" + version "0.9.2-2" + requires 'tmail' classification Library.Development build do installdocs %w[ChangeLog README README-MOD_RUBY INSTALL README-CGI From commitlog at rubyarchive.org Thu Nov 11 16:15:27 2004 From: commitlog at rubyarchive.org (commitlog@rubyarchive.org) Date: Thu Nov 11 16:15:25 2004 Subject: [Rpa-base-devel] r1140 - trunk/ports/iowa_0.9.2 Message-ID: Author: batsman Date: 2004-11-11 14:15:25 -0700 (Thu, 11 Nov 2004) New Revision: 1140 Modified: trunk/ports/iowa_0.9.2/install.rb Log: Fixed the dependency on log4r I broke in 0.9.2-2. Modified: trunk/ports/iowa_0.9.2/install.rb =================================================================== --- trunk/ports/iowa_0.9.2/install.rb 2004-11-11 21:09:32 UTC (rev 1139) +++ trunk/ports/iowa_0.9.2/install.rb 2004-11-11 21:15:25 UTC (rev 1140) @@ -3,9 +3,8 @@ class Install_iowa < RPA::Install::FullInstaller name "iowa" - requires 'log4r' - version "0.9.2-2" - requires 'tmail' + requires 'log4r', 'tmail' + version "0.9.2-3" classification Library.Development build do installdocs %w[ChangeLog README README-MOD_RUBY INSTALL README-CGI From commitlog at rubyarchive.org Thu Nov 11 16:36:17 2004 From: commitlog at rubyarchive.org (commitlog@rubyarchive.org) Date: Thu Nov 11 16:36:11 2004 Subject: [Rpa-base-devel] r1142 - trunk/ports/needle-1.1.0 Message-ID: Author: batsman Date: 2004-11-11 14:36:15 -0700 (Thu, 11 Nov 2004) New Revision: 1142 Added: trunk/ports/needle-1.1.0/install.rb Removed: trunk/ports/needle-1.1.0/needle.gemspec Log: RPAfied. Added: trunk/ports/needle-1.1.0/install.rb =================================================================== --- trunk/ports/needle-1.1.0/install.rb 2004-11-11 21:33:30 UTC (rev 1141) +++ trunk/ports/needle-1.1.0/install.rb 2004-11-11 21:36:15 UTC (rev 1142) @@ -0,0 +1,23 @@ +require 'rpa/install' + +class Install_needle < RPA::Install::FullInstaller + name "needle" + version "1.1.0-1" + classification Library + build do + installdocs %w[ChangeLog LICENSE NEWS TODO] + Dir["doc/*LICENSE*"] + installdocs "doc/manual-html", "manual" + installexamples "example" + installdocs "benchmarks", "benchmarks" + installrdoc %w[doc/README] + Dir["doc/*.rdoc"] + Dir["lib/**/*.rb"] + end + #install { skip_default RunUnitTests } + description < Author: batsman Date: 2004-11-12 06:22:39 -0700 (Fri, 12 Nov 2004) New Revision: 1143 Added: trunk/ports/rubypants-0.2.0/ trunk/ports/rubypants-0.2.0/README trunk/ports/rubypants-0.2.0/Rakefile trunk/ports/rubypants-0.2.0/install.rb trunk/ports/rubypants-0.2.0/rubypants.rb trunk/ports/rubypants-0.2.0/test_rubypants.rb Log: Imported. Added: trunk/ports/rubypants-0.2.0/README =================================================================== --- trunk/ports/rubypants-0.2.0/README 2004-11-11 21:36:15 UTC (rev 1142) +++ trunk/ports/rubypants-0.2.0/README 2004-11-12 13:22:39 UTC (rev 1143) @@ -0,0 +1,114 @@ += RubyPants -- SmartyPants ported to Ruby + +Ported by Christian Neukirchen + Copyright (C) 2004 Christian Neukirchen + +Incooporates ideas, comments and documentation by Chad Miller + Copyright (C) 2004 Chad Miller + +Original SmartyPants by John Gruber + Copyright (C) 2003 John Gruber + + +== RubyPants + +RubyPants is a Ruby port of the smart-quotes library SmartyPants. + +The original "SmartyPants" is a free web publishing plug-in for +Movable Type, Blosxom, and BBEdit that easily translates plain ASCII +punctuation characters into "smart" typographic punctuation HTML +entities. + +See rubypants.rb for more information. + + +== Incompatibilities + +RubyPants uses a different API than SmartyPants; it is compatible to +Red- and BlueCloth. Usually, you call RubyPants like this: + + nicehtml = RubyPants.new(uglyhtml, options).to_html + +where +options+ is an Array of Integers and/or Symbols (if you don't +pass any options, RubyPants will use [2] as default.) + +*Note*:: This is incompatible to SmartyPants, which uses [1] + for default. + +The exact meaning of numbers and symbols is documented at RubyPants#new. + + +== SmartyPants license: + +Copyright (c) 2003 John Gruber +(http://daringfireball.net) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name "SmartyPants" nor the names of its contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + +This software is provided by the copyright holders and contributors +"as is" and any express or implied warranties, including, but not +limited to, the implied warranties of merchantability and fitness +for a particular purpose are disclaimed. In no event shall the +copyright owner or contributors be liable for any direct, indirect, +incidental, special, exemplary, or consequential damages (including, +but not limited to, procurement of substitute goods or services; +loss of use, data, or profits; or business interruption) however +caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence or otherwise) arising in +any way out of the use of this software, even if advised of the +possibility of such damage. + + +== RubyPants license + +Copyright (C) 2004 Christian Neukirchen + +RubyPants is a derivative work of SmartyPants and smartypants.py. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +This software is provided by the copyright holders and contributors +"as is" and any express or implied warranties, including, but not +limited to, the implied warranties of merchantability and fitness +for a particular purpose are disclaimed. In no event shall the +copyright owner or contributors be liable for any direct, indirect, +incidental, special, exemplary, or consequential damages (including, +but not limited to, procurement of substitute goods or services; +loss of use, data, or profits; or business interruption) however +caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence or otherwise) arising in +any way out of the use of this software, even if advised of the +possibility of such damage. + + +== Links + +John Gruber:: http://daringfireball.net +SmartyPants:: http://daringfireball.net/projects/smartypants +Chad Miller:: http://web.chad.org +Christian Neukirchen:: http://kronavita.de/chris Added: trunk/ports/rubypants-0.2.0/Rakefile =================================================================== --- trunk/ports/rubypants-0.2.0/Rakefile 2004-11-11 21:36:15 UTC (rev 1142) +++ trunk/ports/rubypants-0.2.0/Rakefile 2004-11-12 13:22:39 UTC (rev 1143) @@ -0,0 +1,55 @@ +# Rakefile for rubypants -*-ruby-*- +require 'rake/rdoctask' + + +desc "Run all the tests" +task :default => [:test] + +desc "Do predistribution stuff" +task :predist => [:doc] + + +desc "Run all the tests" +task :test do + ruby 'test_rubypants.rb' +end + +desc "Make an archive as .tar.gz" +task :dist => :test do + system "darcs dist -d rubypants#{get_darcs_tree_version}" +end + + +desc "Generate RDoc documentation" +Rake::RDocTask.new(:doc) do |rdoc| + rdoc.options << '--line-numbers --inline-source --all' + rdoc.rdoc_files.include 'README' + rdoc.rdoc_files.include 'rubypants.rb' +end + + +# Helper to retrieve the "revision number" of the darcs tree. +def get_darcs_tree_version + return "" unless File.directory? "_darcs" + + changes = `darcs changes` + count = 0 + tag = "0.0" + + changes.each("\n\n") { |change| + head, title, desc = change.split("\n", 3) + + if title =~ /^ \*/ + # Normal change. + count += 1 + elsif title =~ /tagged (.*)/ + # Tag. We look for these. + tag = $1 + break + else + warn "Unparsable change: #{change}" + end + } + + "-" + tag + "." + count.to_s +end Added: trunk/ports/rubypants-0.2.0/install.rb =================================================================== --- trunk/ports/rubypants-0.2.0/install.rb 2004-11-11 21:36:15 UTC (rev 1142) +++ trunk/ports/rubypants-0.2.0/install.rb 2004-11-12 13:22:39 UTC (rev 1143) @@ -0,0 +1,9 @@ +# Install RubyPants. + +require "rbconfig" +require "fileutils" + +source = "rubypants.rb" +dest = File.join(Config::CONFIG["sitelibdir"], source) + +FileUtils.install(source, dest, :mode => 0644, :verbose => true) Added: trunk/ports/rubypants-0.2.0/rubypants.rb =================================================================== --- trunk/ports/rubypants-0.2.0/rubypants.rb 2004-11-11 21:36:15 UTC (rev 1142) +++ trunk/ports/rubypants-0.2.0/rubypants.rb 2004-11-12 13:22:39 UTC (rev 1143) @@ -0,0 +1,490 @@ +# +# = RubyPants -- SmartyPants ported to Ruby +# +# Ported by Christian Neukirchen +# Copyright (C) 2004 Christian Neukirchen +# +# Incooporates ideas, comments and documentation by Chad Miller +# Copyright (C) 2004 Chad Miller +# +# Original SmartyPants by John Gruber +# Copyright (C) 2003 John Gruber +# + +# +# = RubyPants -- SmartyPants ported to Ruby +# +# == Synopsis +# +# RubyPants is a Ruby port of the smart-quotes library SmartyPants. +# +# The original "SmartyPants" is a free web publishing plug-in for +# Movable Type, Blosxom, and BBEdit that easily translates plain ASCII +# punctuation characters into "smart" typographic punctuation HTML +# entities. +# +# +# == Description +# +# RubyPants can perform the following transformations: +# +# * Straight quotes (" and ') into "curly" quote +# HTML entities +# * Backticks-style quotes (``like this'') into "curly" quote +# HTML entities +# * Dashes (-- and ---) into en- and em-dash +# entities +# * Three consecutive dots (... or . . .) into an +# ellipsis entity +# +# This means you can write, edit, and save your posts using plain old +# ASCII straight quotes, plain dashes, and plain dots, but your +# published posts (and final HTML output) will appear with smart +# quotes, em-dashes, and proper ellipses. +# +# RubyPants does not modify characters within
,
+# , ,  or
+#