tcl repository notes

tags:

    1. Name
    2. Requirements
      1. Use cases
      2. Metadata
      3. Issues
      4. Required Repository Functionality
      5. Optional Repository Functionality
      6. Reference Client Features
      7. Advanced Client Features
    3. Questions
    4. Policies
    5. Site Organization
    6. Workflow
      1. Add new package
      2. Update a package
      3. Remove a package
      4. Find a package
      5. Download and install a package
    7. DB Schema
    8. Controller Actions
    9. Activity Diagrams
      1. Upload
        1. Requirements
        2. Methods
        3. API
        4. Web
    10. Other Input

Name

mystcl? catalytcl? kinetcl? attcl? systematcl? optcl? genetcl? grammatcl? elliptcl? gnostcl? identcl? linguistcl? practcl? phonetcl? cortcl? synaptcl? or maybe an acronym? tenet: tcl extention network

Requirements

Use cases

development will proceed with the perspective of the repository being used in the following ways:

Metadata

pkg metadata file must be both human and computer readable

ReqdAutoData
Xpackage name
Xdescr (short description)
description
categories/tags
XXpackage provides (might differ from human readable name)
XXfilenames (does it have to be a single file?)
XXdependencies (needs to be in a format we can xref)
XXversion
Xplatforms
XXtype (binary/source/tcl/etc)
Xinstaller (configure/make,script,binary installer, none, etc)
Xreleased date stamp
Xuploaded date stamp
author
relevant links
change log
Xcommands provided
XXlist of files installed by package
Xtotal size of installed files?
XXchecksum

Issues


Required Repository Functionality


Optional Repository Functionality

Do not preclude these in the initial design but do not get overly ambitious

Reference Client Features

a client isnt quite within scope of the project but it might be good to release a basic usable reference client at the same time as the repository. there is also the possibility of an upload client which could possibly provide some usability enhancements over a web interface.

Advanced Client Features


Questions


Policies


Site Organization

The main sections should be as follows

Workflow

Add new package

  1. create a user account if needed
  2. upload files (does it have to be a single file?)
  3. app decodes files and captures as much metadata as possible
  4. user fills out web form adding or correcting metadata
  5. done

Update a package

2 cases:
  1. new upstream release, with a new version number etc.
  2. a packager may have fixed a mistake in an earlier upload and needs to replace it. So, same release version number built from the same source release, but it should still count as an "upgrade".

Most Linux distributions append an auxilliary "release" or "build" number to the upstream version number to handle this case. Example:
  1. upstream releases package foo version 3.4
  2. packager builds binary foo-3.4-1.tar.gz, signs it and uploads it to the repository
  3. packager finds mistake in packaging, needs to apply patch, or whatever
  4. packager fixes problem, builds binary foo-3.4-2.tar.gz and uploads that.

Remove a package

Find a package

  1. use a client which uses the api (the client will present its own search, list, or other interface)
or
  1. hit the front page
  2. search, or browse by tag, etc

Download and install a package

  1. find a package
  2. select a platform
  3. select a version
  4. select a package type (binary, source, pure tcl, etc) (optional)

DB Schema

  create table file (
  id integer primary key,
  filename varchar,
  size integer,
  checksum varchar,
  instance integer,
  foreign key (instance) references instance (id)
  );

  create table bundle (
  id integer primary key,
  name varchar,
  descr varchar,
  description text,
  provides varchar,
  -- key value pairs, eg home, docs, cvs, etc. should this be a table?
  links text,
  );

  create table instance (
  id integer primary key,
  bundle integer,
  version
  -- (binary/source/tcl/etc)
  type varchar,
  -- this only allows for one platform, but platform table could have entries like "unix", "windows", "all"
  platform integer,
  installer (configure/make,script,binary installer, none, etc)
  documentation text,
  uploaded_by integer,
  uploaded datetime,
  modified datetime,
  modified_by integer,
  released date,
  -- list of installed files?
  files text,
  -- sum of installed files
  size integer,
  commands varchar,
  author integer,
  license varchar,
  -- may create non "real" instances for purpose of depending on them
  real integer,
  foreign key (bundle) references bundle (id),
  foreign key (platform) references platform (id),
  foreign key (author,uploaded_by,modified_by) references user (id,id,id)
  );

  create table dependencies (
  instance integer,
  package varchar,
  -- exact, greater than, conflicts, etc
  type varchar,
  -- tip 268 style version spec
  version varchar,
  foreign key (instance) references instance (id)
  );

  create table platform (
  id
  name
  identifier
  );

  create table user (
  id integer primary key,
  username varchar unique not null,
  password varchar,
  realname varchar,
  email varchar,
  registered datetime,
  login datetime,
  -- may create non "real" users for purpose of authors
  real integer
  );

  create table perms (
  bundle integer,
  user integer,
  -- perm string is single letter, or word? multiple words/letters per row or multiple rows?
  perm varchar,
  foreign key (bundle) references bundle (id),
  foreign key (user) references user (id)
  );

  create table tags (
  bundle integer,
  tag varchar,
  foreign key (bundle) references bundle (id)
  );

  create table comments (
  bundle integer,
  -- what to do about anonymous comments? maybe nonreal anonymous user entry
  user integer,
  comment text,
  posted datetime,
  foreign key (bundle) references bundle (id)
  );

Controller Actions

add new package
add new version
update version
add user
update user
search
edit maintainers
get metadata from uploaded package
seems like a short list, what am I missing?

Activity Diagrams

Upload

Requirements


Methods


API

  1. authenticated api call made, file and optional metadata supplied, token returned
  2. api call made with token, returns not ready
  3. instance entry is created in incoming db table. file is decoded to try to automatically determine any missing metadata. db row filled in
  4. api call made with token, returns ok or more info needed
  5. if ok then temp row is moved to real table
  6. if more info needed then temp row expires after X days. user can log in and provide token to fill in missing data. missing data is returned with more info result so client can prompt user

Web

  1. logged in user presented with new instance form
  2. file attached, optional form filled out, submitted
  3. instance entry is created in incoming db table. file is decoded to try to automatically determine any missing metadata. db row filled in
  4. results page refreshes every X seconds until ready
  5. if ok then temp row is moved to real table
  6. if more info needed then prompt user

Other Input

Anonymous on Nov 11 2007 wrote:
Some things to consider:
  1. MD5 or some other checksum so that a person can confirm they got the right thing
  2. Some sort of authentication so that one can track what changes were made by whom (in case of bugs, trojans, etc.)
  3. Packages should be able to be installed without the installer having to create special directories (don't assume things are going into /usr/local, etc.)
  4. Packages should include doc - or at least a pointer to where to find doc
  5. Authority location for package should be required
  6. Orphan packages (where author has disappeared or ceased to be interested in supporting package) should be marked as such
  7. Users of the repository should be able to relatively simply be able to determine what items are new


jenglish> It would be really nice to be able to say "make upload" and not have to type anything else other than maybe a GPG passphrase to get a new build uploaded.

Colin> server needs to be able to answer 'is anything in this set newer than X'
Colin> reduce accesses

muonics would like to see a namespace registry

nem and colin suggest allowing for an http vfs