Opened 16 years ago

Closed 15 years ago

#12898 closed submission (wontfix)

TinyOS 2.x operating system port

Reported by: platon@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: tinyos, operating system, wireless sensor network lack-of-interest Cc: notalpe@…, ryandesign (Ryan Carsten Schmidt), jmroot (Joshua Root)
Port:

Description

This port aims at adding the tinyos operating system (2.x) to the repository. TinyOS is an operating system for resource-bounded devices such as wireless sensor networks. I am submitting a port for NesC as well for wireless sensor networks in another ticket. For this reason (and for future ports), I wonder whether a "wsn" port category would be good.

This port installs tinyos for AVR-compatible boards by default, i.e. the command-line utilities to use the system and the appropriate dependencies. Users for other hardware (Telos, etc.) will need to install separately the required components. I am ok to add such support as variants, if some requests come up.

The only variant in the port `develenv' installs the tinyos development environment as well. This environment requires several resources, so it _violates the MacPorts tree_ (that is why I chose a variant for the moment). The violation is "clean" however, as all required resources and example codes are put in a "tinyos-dev" directory created under ${prefix}. The "port uninstall" command does not remove this directory. If the MacPorts team could suggest a much better way to install the environment, I am glad to do it.

Attachments (4)

patch-avr-rules.diff (881 bytes) - added by platon@… 16 years ago.
patch-sim-extra.diff (974 bytes) - added by platon@… 16 years ago.
tinyos.sh.tpl (235 bytes) - added by platon@… 16 years ago.
Script template to let the user set up its environment (the port install instantiates the template as necessary).
Portfile (2.2 KB) - added by platon@… 16 years ago.
Update of the portfile to remove a now useless patch (patch-sim-extra.diff).

Download all attachments as: .zip

Change History (14)

comment:1 Changed 16 years ago by platon@…

The port has been tested on a fresh machine, and fresh install of MacPorts (1.5.2), under Mac OS X 10.4.

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: platon@… ryandesign@… added

Thanks for contributing! Some comments:

  • The comment "Tested on a fresh MacPorts 1.5.2 installation on Mac OS X 10.4" does not belong in the portfile.
  • Simply listing "wsn" in the categories keyword is enough to create the category (virtually, anyway).
  • The develenv variant does not appear to bring in any additional port dependencies, so wouldn't it be better to always install the development environment?
  • The development environment should be installed within ${destroot}${prefix} so that it is registered as belonging to the port and uninstalled when using port uninstall. I see your variant description says this is intentional "to keep user contents". What user content might there be, and have you confirmed that MacPorts would really remove it? I thought MacPorts would only remove files registered to the port, and not any files the user manually added.
  • Renaming the fetched CVS source directory in post-fetch is weird; usually you should set the worksrcdir variable, like "worksrcdir tinyos-2.x" or, looking at your later lines, probably "worksrcdir tinyos-2.x/tools".
  • Using system to copy files and change ownership is discouraged; can you rework this to use xinstall instead?
  • It's a little weird to be creating files out of thin air from within the portfile. Usually you would have a template file in the port's files directory and patch it using reinplace. See the wine port for a simple example.
  • The patchfile patch-sim-extra.diff hard-codes the prefix /opt/local, but MacPorts could be installed in any prefix. You must use the ${prefix} variable, probably in a reinplace statement, to fix this.

Can you please attach revised files?

Changed 16 years ago by platon@…

Attachment: patch-avr-rules.diff added

Changed 16 years ago by platon@…

Attachment: patch-sim-extra.diff added

Changed 16 years ago by platon@…

Attachment: tinyos.sh.tpl added

Script template to let the user set up its environment (the port install instantiates the template as necessary).

comment:3 Changed 16 years ago by platon@…

This update of the portfile submission addresses all items from Ryan's comments. I have however maintained the post-fetch renaming of the worksrcdir, from tinyos-2.x to tinyos-2.0.2, so that to reflect the exact version of the system. The development environment is now installed by default under ${prefix}/tinyos-2.0.2 (with the generated environment configuration script) and registered for proper uninstall. The system was tested under MacPorts 1.5.2. It does not work with 1.6 because of the mtree violation (necessary, in my sense).

comment:4 Changed 16 years ago by jmroot (Joshua Root)

If you really need to install files in a non-standard location, you can set "destroot.violate_mtree yes".

Changed 16 years ago by platon@…

Attachment: Portfile added

Update of the portfile to remove a now useless patch (patch-sim-extra.diff).

comment:5 Changed 16 years ago by jmroot (Joshua Root)

Cc: jmr@… added; platon@… removed

You're still referencing patch-sim-extra.diff in pre-patch and post-patch.

comment:6 Changed 15 years ago by giorgio.maz+mp@…

I'm wondering if we could obtain a better result collaborating. This is the new ticket that I've open for the port of TinyOS 2.x.

If anyone would like to help me I will really really appreciate.

comment:7 Changed 15 years ago by jmroot (Joshua Root)

Type: enhancementsubmission

comment:8 Changed 15 years ago by (none)

Milestone: Port Submissions

Milestone Port Submissions deleted

comment:9 Changed 15 years ago by raimue (Rainer Müller)

Keywords: lack-of-interest added

What is the current progress? Is there still interest on getting this into MacPorts?

comment:10 Changed 15 years ago by raimue (Rainer Müller)

Resolution: wontfix
Status: newclosed

Lack of interest.

Note: See TracTickets for help on using tickets.