Re: memtester port
On Jul 14, 2009, at 18:28, Scott Haneda wrote: livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix} On Jul 14, 2009, at 20:46, Jeremy Lavergne wrote: On Jul 14, 2009, at 7:28 PM, Scott Haneda wrote: Here is my final port, my areas of concern are the livecheck regex. That is a copy and paste from elsewhere, and I can not break it out. You have to escape regex inside livecheck? Yes, if you use quotations, you must use double escapes. If you use braces, then only one escape is needed. Right. The first backslash escapes the next character from the Tcl interpreter. The second backslash escapes the next character from the regular expression interpreter. If you use a Tcl curlybrace-enclosed string instead of a doublequote-enclosed string, you don't use the extra level of escaping. So d+ is all numbers, that ?: is a mystery to me, and then a dot, and then a digit, and then aything. I have three distinct version digits, so there may be some altering that needs to happen here. Perhaps the * means, match the pattern of digit and dot as many times as it happens? The d is one numeric digit or more. To be precise, \d is a single digit 0 thru 9. + means one or more of the preceding. So \d+ is one or more digits 0 thru 9. The ?: basically means find the first one and stop -- saves on speed and memory versus matching the whole line. No, ?:, when it is the first thing inside parentheses, means the parentheses only group but are not remembered as a backreference. It's pretty irrelevant in this case. Livecheck only makes use of the first remembered parentheses (which it uses as the version number) and any subsequent remembered parentheses are not used at all. * means 0 or more (and finally ? means 0 or 1 -- that's ? + and * quantifiers). Right. So all together, the remembered part for the version number is: (\d+(?:\.\d+)*) meaning: one or more digits, followed by zero or more period-followed- by-one-or-more-digits. The period has a backslash before it because otherwise it doesn't mean a period; it means any character. I personally use the simpler (\[0-9.\]+) meaning: one or more digit-or-period. This period does not have a backslash before it because it is inside a character class (the square brackets). There are many ways to skin a cat with regular expressions. And there are many references that will teach you all about regular expressions, and I encourage you to find one and read all about them. They take a bit of getting used to but once you know the syntax they're very powerful. Any other suggestions before I ship it off to trac? Does it pass `port lint --nitpick memtester`? IMHO passing port lint is sufficient. --nitpick is, well, nit- picky, and I don't have a problem with ports not conforming to it. ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 3:01 PM, Scott Haneda wrote: I am not seeing a port for memtester. # $Id$ PortSystem 1.0 namememtester version 4.0.8 categories sysutils maintainers hostwizard.com:scott description A userspace utility for testing the memory subsystem for faults. long_description A userspace utility for testing the memory subsystem for faults. homepagehttp://pyropus.ca/software/memtester/ master_siteshttp://pyropus.ca/software/memtester/old-versions checksums md5 a4971ed1ccaf5b2e2148fd66b0eb7363 \ sha11330edaa60e0d797b83df51a56bba377db9223fc \ rmd160 b804eb9563f98ffbd51ce17c091b71a466ba4eae ... --- Configuring memtester DEBUG: Using compiler 'Mac OS X gcc 4.0' DEBUG: Executing org.macports.configure (memtester) DEBUG: Environment: CFLAGS='-O2' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2' MACOSX_DEPLOYMENT_TARGET='10.5' CPP='/usr/bin/ cpp-4.0' CXX='/usr/bin/g++-4.0' F90FLAGS='-O2' LDFLAGS='-L/opt/local/ lib' FCFLAGS='-O2' OBJC='/usr/bin/gcc-4.0' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2' FFLAGS='-O2' CC='/usr/bin/gcc-4.0' DEBUG: Assembled command: 'cd /opt/local/var/macports/build/ _Users_me_macports_sysutils_memtester/work/memtester-4.0.8 ./ configure --prefix=/opt/local' sh: ./configure: No such file or directory Error: Target org.macports.configure returned: configure failure: shell command cd /opt/local/var/macports/build/ _Users_me_macports_sysutils_memtester/work/memtester-4.0.8 ./ configure --prefix=/opt/local returned error 127 Command output: sh: ./configure: No such file or directory Warning: the following items did not execute (for memtester): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing. Where am I getting tripped up on this one? You need to add `use_configure no` Do I need destroot to also install the binary and the man pages, or does that happen as part of make install? Could this be that make is not able to understand the prefix? You might consider patching the Makefile's install portion, or you'll find yourself using xinstall lines to do the installation 'manually' in the portfile. I could then add configure.pre_args-delete --prefix=${prefix} and just hand install this man and binary in correct locations? Here is the by hand method: $sudo make --prefix=/opt/local make: unrecognized option `--prefix=/opt/local' Usage: make [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. -d Print lots of debugging information. --debug[=FLAGS] Print various types of debugging information. -e, --environment-overrides Environment variables override makefiles. -f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. -h, --help Print this message and exit. -i, --ignore-errors Ignore errors from commands. -I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -k, --keep-goingKeep going when some targets can't be made. -l [N], --load-average[=N], --max-load[=N] Don't start multiple jobs unless load is below N. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Don't actually run any commands; just print them. -o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. -p, --print-data-base Print make's internal database. -q, --question Run no commands; exit status says if up to date. -r, --no-builtin-rules Disable the built-in implicit rules. -R, --no-builtin-variables Disable the built-in variable settings. -s, --silent, --quiet Don't echo commands. -S, --no-keep-going, --stop Turns off -k. -t, --touch Touch targets instead of remaking them. -v, --version Print the version number of make and exit. -w, --print-directory Print the current directory. --no-print-directoryTurn off -w, even if it was turned on implicitly. -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. --warn-undefined-variables Warn when an undefined variable is referenced. -N OPTION, --NeXT-option=OPTION Turn on value of
Re: memtester port
Where am I getting tripped up on this one? You need to add `use_configure no` Ok, done http://dl.getdropbox.com/u/340087/Drops/07.14.09/memtest-4460164b-123912.txt Looks like this was called from the makefile: mkdir -m 755 -p /usr/local/{bin,man/man8} install -m 755 memtester /usr/local/bin/ gzip -c memtester.8 memtester.8.gz ; install -m 644 memtester.8.gz / usr/local/man/man8/ That probably was not good? Do I need destroot to also install the binary and the man pages, or does that happen as part of make install? Could this be that make is not able to understand the prefix? You might consider patching the Makefile's install portion, or you'll find yourself using xinstall lines to do the installation 'manually' in the portfile. My plan was to infact xinstal the files, but I am open to learning how to patch the makefile. In this one, do I need to just reinplace INSTALLPATH = /usr/local Here is the makefile http://dl.getdropbox.com/u/340087/Drops/07.14.09/Makefile-5698c444-124226.txt Thanks -- Scott * If you contact me off list replace talklists@ with scott@ * ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
Ooo! you use dropbox! /drool On Jul 14, 2009, at 3:43 PM, Scott Haneda wrote: http://dl.getdropbox.com/u/340087/Drops/07.14.09/memtest-4460164b-123912.txt smime.p7s Description: S/MIME cryptographic signature ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 3:43 PM, Scott Haneda wrote: My plan was to infact xinstal the files, but I am open to learning how to patch the makefile. In this one, do I need to just reinplace INSTALLPATH = /usr/local Here is the makefile http://dl.getdropbox.com/u/340087/Drops/07.14.09/Makefile-5698c444-124226.txt That's the major thing. You will also want to change the man/man8 to be share/man/man8. smime.p7s Description: S/MIME cryptographic signature ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 12:44 PM, Jeremy Lavergne wrote: Ooo! you use dropbox! /drool On Jul 14, 2009, at 3:43 PM, Scott Haneda wrote: http://dl.getdropbox.com/u/340087/Drops/07.14.09/memtest-4460164b-123912.txt ha ha :) If you want to try out a small little app I made, allows you to drop any file, or group of files/folders, and it will create that semi obfuscated url above, and put it on your clipboard. It also alerts with Growl. You can use one file, and it does as above, your can use multiple files, and it will create a list of urls, and you can drop a folder, and it will zip it. You can get it here http://dl.getdropbox.com/u/340087/Drops/07.14.09/Droppings-811da69a-125445.zip -- Scott * If you contact me off list replace talklists@ with scott@ * ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 12:46 PM, Jeremy Lavergne wrote: On Jul 14, 2009, at 3:43 PM, Scott Haneda wrote: My plan was to infact xinstal the files, but I am open to learning how to patch the makefile. In this one, do I need to just reinplace INSTALLPATH = /usr/local Here is the makefile http://dl.getdropbox.com/u/340087/Drops/07.14.09/Makefile-5698c444-124226.txt That's the major thing. You will also want to change the man/man8 to be share/man/man8. Ok, working on it. How do you test this as you go, and tell ports to not clean up the files, so I can see if the reinplaces worked to my liking? -- Scott * If you contact me off list replace talklists@ with scott@ * ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
You just tell it what phase you want it to do, and then it'll stop after it. `sudo port patch memtester` fetch - extract - patch - configure - build - test? - destroot - install - activate It's on the Guide if you need a precise listing. On Jul 14, 2009, at 3:58 PM, Scott Haneda wrote: Ok, working on it. How do you test this as you go, and tell ports to not clean up the files, so I can see if the reinplaces worked to my liking? smime.p7s Description: S/MIME cryptographic signature ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
There's also -k (keep mode) which should counteract the default to autoclean. On Jul 14, 2009, at 3:58 PM, Scott Haneda wrote: Ok, working on it. How do you test this as you go, and tell ports to not clean up the files, so I can see if the reinplaces worked to my liking? smime.p7s Description: S/MIME cryptographic signature ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 12:46 PM, Jeremy Lavergne wrote: On Jul 14, 2009, at 3:43 PM, Scott Haneda wrote: My plan was to infact xinstal the files, but I am open to learning how to patch the makefile. In this one, do I need to just reinplace INSTALLPATH = /usr/local Here is the makefile http://dl.getdropbox.com/u/340087/Drops/07.14.09/Makefile-5698c444-124226.txt That's the major thing. You will also want to change the man/man8 to be share/man/man8. Is this an issue wrt to the mkdir? Should I change that as well? install: all mkdir -m 755 -p $(INSTALLPATH)/{bin,man/man8} install -m 755 memtester $(INSTALLPATH)/bin/ gzip -c memtester.8 memtester.8.gz ; install -m 644 memtester.8.gz $ (INSTALLPATH)/man/man8/ Is the way I am doing ${master_sites} correct? Is it acceptable to leave out the long description, I think the short is more than enough. Is my category correct in sysutils? # $Id$ PortSystem 1.0 namememtester version 4.0.8 categories sysutils maintainers hostwizard.com:scott description A userspace utility for testing the memory subsystem for faults. long_description A userspace utility for testing the memory subsystem for faults. homepagehttp://pyropus.ca/software/memtester/ master_sites${homepage}/old-versions checksums md5 a4971ed1ccaf5b2e2148fd66b0eb7363 \ sha11330edaa60e0d797b83df51a56bba377db9223fc \ rmd160 b804eb9563f98ffbd51ce17c091b71a466ba4eae use_configure no pre-patch { reinplace s|/usr/local|${prefix}| ${worksrcpath}/Makefile reinplace s|/man/man8/|/share/man/man8| ${worksrcpath}/Makefile } $sudo port -d install memtester DEBUG: Found port in file:///Users/haneda/macports/sysutils/memtester DEBUG: Changing to port directory: /Users/haneda/macports/sysutils/ memtester DEBUG: setting option os.universal_supported to yes DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided DEBUG: org.macports.distfiles registered provides 'distfiles', a pre- existing procedure. Target override will not be provided DEBUG: not using configure, so not adding the default universal variant DEBUG: Requested variant darwin is not provided by port memtester. DEBUG: Requested variant i386 is not provided by port memtester. DEBUG: Requested variant macosx is not provided by port memtester. DEBUG: Executing org.macports.main (memtester) DEBUG: Skipping completed org.macports.fetch (memtester) DEBUG: Skipping completed org.macports.checksum (memtester) DEBUG: Skipping completed org.macports.extract (memtester) DEBUG: Skipping completed org.macports.patch (memtester) DEBUG: Skipping completed org.macports.configure (memtester) DEBUG: Skipping completed org.macports.build (memtester) DEBUG: Skipping completed org.macports.destroot (memtester) --- Installing memtester @4.0.8_0 DEBUG: Executing org.macports.install (memtester) couldn't change working directory to /opt/local/var/macports/build/ _Users_haneda_macports_sysutils_memtester/work/destroot: no such file or directory DEBUG: Executing org.macports.activate (memtester) --- Activating memtester @4.0.8_0 Error: Target org.macports.activate returned: Image error: Source file /opt/local/var/macports/software/memtester/4.0.8_0 does not appear to exist (cannot lstat it). Unable to activate port memtester. Warning: the following items did not execute (for memtester): org.macports.activate Error: Status 1 encountered during processing. I am messing something up, as there is a path above that is not there. -- Scott * If you contact me off list replace talklists@ with scott@ * ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 4:14 PM, Scott Haneda wrote: Is this an issue wrt to the mkdir? Should I change that as well? You wouldn't make it past your pre-patch if that were the case. It would error out saying it couldn't find the file. install: all mkdir -m 755 -p $(INSTALLPATH)/{bin,man/man8} install -m 755 memtester $(INSTALLPATH)/bin/ gzip -c memtester.8 memtester.8.gz ; install -m 644 memtester.8.gz $(INSTALLPATH)/man/man8/ Is the way I am doing ${master_sites} correct? Is it acceptable to leave out the long description, I think the short is more than enough. Is my category correct in sysutils? long_description is needed, but you can set it to ${description} I need to head out for a few hours ... someone else care to continue helping? :-) # $Id$ PortSystem 1.0 namememtester version 4.0.8 categories sysutils maintainers hostwizard.com:scott description A userspace utility for testing the memory subsystem for faults. long_description A userspace utility for testing the memory subsystem for faults. homepagehttp://pyropus.ca/software/memtester/ master_sites${homepage}/old-versions checksums md5 a4971ed1ccaf5b2e2148fd66b0eb7363 \ sha11330edaa60e0d797b83df51a56bba377db9223fc \ rmd160 b804eb9563f98ffbd51ce17c091b71a466ba4eae use_configure no pre-patch { reinplace s|/usr/local|${prefix}| ${worksrcpath}/Makefile reinplace s|/man/man8/|/share/man/man8| ${worksrcpath}/Makefile } smime.p7s Description: S/MIME cryptographic signature ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 1:21 PM, Jeremy Lavergne wrote: long_description is needed, but you can set it to ${description} I need to head out for a few hours ... someone else care to continue helping? :-) I think I got it, cool thing is, now people do not have to pay the whopping $1.39 to buy this app :) Here is my final port, my areas of concern are the livecheck regex. That is a copy and paste from elsewhere, and I can not break it out. You have to escape regex inside livecheck? So d+ is all numbers, that ?: is a mystery to me, and then a dot, and then a digit, and then aything. I have three distinct version digits, so there may be some altering that needs to happen here. Perhaps the * means, match the pattern of digit and dot as many times as it happens? Any other suggestions before I ship it off to trac? PortSystem 1.0 namememtester version 4.0.8 categories sysutils maintainers hostwizard.com:scott platforms darwin description A userspace utility for testing the memory subsystem for faults. long_description${description} homepagehttp://pyropus.ca/software/memtester/ master_sites${homepage}/old-versions checksums md5 a4971ed1ccaf5b2e2148fd66b0eb7363 \ sha11330edaa60e0d797b83df51a56bba377db9223fc \ rmd160 b804eb9563f98ffbd51ce17c091b71a466ba4eae livecheck.url ${homepage}/old-versions/ livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix} use_configure no pre-patch { reinplace s|/usr/local|${destroot}${prefix}| ${worksrcpath}/ Makefile reinplace s|man/man|share/man/man| ${worksrcpath}/Makefile } -- Scott * If you contact me off list replace talklists@ with scott@ * ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
Any other suggestions before I ship it off to trac? Does it pass `port lint --nitpick memtester`? Thanks for the regex explanation, I was so hung up on that quoting issue and escapes. Handy command on the nitpick $port lint --nitpick memtester --- Verifying Portfile for memtester --- 0 errors and 0 warnings found. I had a few newline issues, but I am all set now. -- Scott * If you contact me off list replace talklists@ with scott@ * ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
Re: memtester port
On Jul 14, 2009, at 7:36 PM, Jeremy Lavergne wrote: Alrighty, create a port submission ticket and you're good to go. On Jul 14, 2009, at 10:01 PM, Scott Haneda wrote: I had a few newline issues, but I am all set now. http://trac.macports.org/ticket/20306 -- Scott * If you contact me off list replace talklists@ with scott@ * ___ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev