4 years agofeatures/core: started working on build method, v2 rethink
Michael D Labriola [Sun, 10 Feb 2013 21:09:23 +0000]
features/core: started working on build method, v2

Still nowhere near done.  This commit even leaves off with 2 half-done
lines that won't parse in features/core.py

4 years agonotes: fobj must be opened in binary mode
Michael D Labriola [Sun, 10 Feb 2013 18:52:50 +0000]
notes: fobj must be opened in binary mode

4 years agonotes: should notes be opened in binary or text mode?
Michael D Labriola [Sat, 12 Jan 2013 01:35:40 +0000]
notes: should notes be opened in binary or text mode?

I was opening in text mode (default) in the create_func, but when we pull
the fobj for NOTES out of the tar, it's opened in binary mode...  I either
have to decide that one way is the only way to do it, or add some type
checking conditionals in the notes constructor

4 years agofeatures/core: started working on build method
Michael D Labriola [Sat, 12 Jan 2013 01:33:43 +0000]
features/core: started working on build method

This is nowhere near done.  I'm still figuring out what the function
prototype for build funcs should be, plumbing the cli for --build, and
laying other groundwork for testing this out...

4 years agofeatures/core: create_func writes to appropriately named file
Michael D Labriola [Sat, 12 Jan 2013 01:28:28 +0000]
features/core: create_func writes to appropriately named file

4 years agofeatures/perms: move tarinfo forging to build stage
Michael D Labriola [Sun, 6 Jan 2013 04:03:34 +0000]
features/perms: move tarinfo forging to build stage

4 years agofeatures/core: working on create method, v2
Michael D Labriola [Sun, 6 Jan 2013 03:59:39 +0000]
features/core: working on create method, v2

Fixed the corrupt archive problems from the previous commit and remembered
to add NOTES to the archive.  This seems to be working now.

4 years agofeatures/core: working on create method
Michael D Labriola [Sat, 5 Jan 2013 02:20:01 +0000]
features/core: working on create method

This doesn't quite work yet.  No exceptions, but the resulting tarball is
corrupt... sigh.

4 years agonotes: features can be enabled by adding NOTES section
Michael D Labriola [Fri, 4 Jan 2013 23:31:04 +0000]
notes: features can be enabled by adding NOTES section

This commit allows for implicit feature enabling by assuming that all
section headers correspond with a feature name (except for the default
sections).

In other words, if you add a [perms] section, it automatically adds perms
to the required feature list.

NOTE: This commit also changes the notes.options.flags map into the
      notes.options.features list because we're going to use feature
      sections in the NOTES file to pass arguments/variables into the
      various feature funcs.

4 years agofeatures: added default item to feature_struct
Michael D Labriola [Fri, 4 Jan 2013 18:50:07 +0000]
features: added default item to feature_struct

This commit makes register_feature populate our list of default features
(instead of specifying them statically).

It also moves the action_map generation to register_feature.

4 years agofeatures: reworked function_list and stage_map code, v2
Michael D Labriola [Fri, 4 Jan 2013 18:31:49 +0000]
features: reworked function_list and stage_map code, v2

4 years agomisc cleanup
Michael D Labriola [Fri, 4 Jan 2013 18:31:11 +0000]
misc cleanup

4 years agofeatures: reworked function_list and stage_map code
Michael D Labriola [Fri, 4 Jan 2013 18:22:55 +0000]
features: reworked function_list and stage_map code

4 years agonotes: handle default flags and inverse flags
Michael D Labriola [Fri, 4 Jan 2013 18:21:40 +0000]
notes: handle default flags and inverse flags

4 years agofeatures: initial commit of core, perms, and checksum
Michael D Labriola [Fri, 4 Jan 2013 18:19:00 +0000]
features: initial commit of core, perms, and checksum

4 years agofeatures/core: initial commit
Michael D Labriola [Mon, 31 Dec 2012 18:43:44 +0000]
features/core: initial commit

4 years agocli: added required feature check to do_create
Michael D Labriola [Mon, 31 Dec 2012 18:43:06 +0000]
cli: added required feature check to do_create

4 years agoupdated doc strings
Michael D Labriola [Mon, 31 Dec 2012 18:42:28 +0000]
updated doc strings

4 years agofeatures: all .py files now get autoloaded when srp.features is imported
Michael D Labriola [Mon, 31 Dec 2012 16:08:25 +0000]
features: all .py files now get autoloaded when srp.features is imported

4 years agomodules/cli: started fleshing out package creation
Michael D Labriola [Fri, 21 Dec 2012 21:56:12 +0000]
modules/cli: started fleshing out package creation

4 years agoexample: renamed NOTES file
Michael D Labriola [Fri, 21 Dec 2012 21:54:09 +0000]
example: renamed NOTES file

4 years agonotes: initial commit
Michael D Labriola [Fri, 21 Dec 2012 21:13:01 +0000]
notes: initial commit

4 years agofeatures: added feature_struct
Michael D Labriola [Fri, 21 Dec 2012 17:26:27 +0000]
features: added feature_struct

4 years agomodules: cleanup
Michael D Labriola [Fri, 21 Dec 2012 16:11:25 +0000]
modules: cleanup

4 years agofeatures: make register_feature track pre and post requirements
Michael D Labriola [Fri, 21 Dec 2012 15:32:37 +0000]
features: make register_feature track pre and post requirements

This commit is the 1st draft of an attempt to make register_feature track
not only the features that required before this one, but also the ones that
are required after it.  This is being accomplished by creating a registration
structure.

Note that this means the stage list is reduced to simply: build, install,
uninstall, and action.

4 years agoexample: cleanup
Michael D Labriola [Sat, 15 Dec 2012 18:32:32 +0000]
example: cleanup

4 years agofeatures: cleaned up a bit
Michael D Labriola [Sat, 15 Dec 2012 18:32:12 +0000]
features: cleaned up a bit

4 years agofeatures: initial commit
Michael D Labriola [Sat, 15 Dec 2012 18:31:55 +0000]
features: initial commit

4 years agoadded .gitignore
Michael D Labriola [Sat, 15 Dec 2012 18:31:30 +0000]
added .gitignore

5 years agoexample: added new autotools-based 3.0 example
Michael D Labriola [Sun, 12 Aug 2012 18:23:05 +0000]
example: added new autotools-based 3.0 example

The SRP_Files dir is copied straight out of the dev-3.0 tree for now.

5 years agosrp: commented out exception handling for now
Michael D Labriola [Wed, 27 Jun 2012 18:42:01 +0000]
srp: commented out exception handling for now

5 years agocli: added --create
Michael D Labriola [Wed, 27 Jun 2012 18:40:55 +0000]
cli: added --create

5 years agoinit: commented out some unneeded code
Michael D Labriola [Wed, 27 Jun 2012 18:40:00 +0000]
init: commented out some unneeded code

5 years agodev-3.0: commiting some old stuff
Michael D Labriola [Wed, 27 Jun 2012 18:39:08 +0000]
dev-3.0: commiting some old stuff

5 years agoreorg: starting to integrate all the dev stuff
Michael D Labriola [Wed, 7 Mar 2012 18:35:04 +0000]
reorg: starting to integrate all the dev stuff

5 years agoadded notes to myself
Michael D Labriola [Wed, 7 Mar 2012 18:00:18 +0000]
added notes to myself

5 years agoinit: tidied up more arg parsing
Michael D Labriola [Sun, 4 Mar 2012 19:36:46 +0000]
init: tidied up more arg parsing

5 years agoinit: fixed default handling and added fnmatch notes
Michael D Labriola [Sun, 4 Mar 2012 14:18:29 +0000]
init: fixed default handling and added fnmatch notes

5 years agoinit: reworked parsing to use seperate -p flag
Michael D Labriola [Sat, 3 Mar 2012 18:35:13 +0000]
init: reworked parsing to use seperate -p flag

5 years agomore argparse work
Michael D Labriola [Sat, 3 Mar 2012 14:40:29 +0000]
more argparse work

5 years agostarted playing with python3's argparser
Michael D Labriola [Wed, 29 Feb 2012 19:43:19 +0000]
started playing with python3's argparser

5 years agofeatures: converted to python3
Michael D Labriola [Wed, 29 Feb 2012 19:42:50 +0000]
features: converted to python3

6 years agoadded Feature musings
Michael D Labriola [Fri, 18 Nov 2011 19:13:18 +0000]
added Feature musings

7 years agowork: new owneroverride support prerethink
Michael D Labriola [Fri, 9 Jul 2010 00:08:28 +0000]
work: new owneroverride support

This isn't done yet, but was being tested a while ago... before life got
busy.

7 years agoowneroverride: more work
Michael D Labriola [Fri, 9 Jul 2010 00:07:34 +0000]
owneroverride: more work

I don't even remember what I was doing here... but this was staged for
commit from like 2 months ago... ;-)

7 years agoowneroverride: compile a re object for each entry
Michael D Labriola [Sat, 5 Jun 2010 00:19:28 +0000]
owneroverride: compile a re object for each entry

Instead of just storing the regex pattern in our list of rules, we now
store a precompiled re object in there.

Also changed my example v3 package's owneroverride file, as I realized that
the re module uses perl-style regex not awk-style.

7 years agoowneroverride: changed parent class to list
Michael D Labriola [Sat, 29 May 2010 20:24:44 +0000]
owneroverride: changed parent class to list

Changed to parent class of ownerovrride to list from dict.  This is
needed so we can ensure that rules are applied in the order they're
defined in the file.

Also fixed comment handling and splitting on ':' when regex contains
that char.

7 years agoadded overrides to example packages
Michael D Labriola [Sat, 29 May 2010 20:23:37 +0000]
added overrides to example packages

Ha.  My example packages didn't use SRP_OWNEROVERRIDE... guess that
hasn't been getting much testing.

7 years agorewrote owneroverride module
Michael D Labriola [Sat, 29 May 2010 19:50:34 +0000]
rewrote owneroverride module

Pretty much completely rewrote the owneroverride module, giving it
much more functionallity and flexibilty.  It now supports so much more
than changing ownership, that I might want to consider renaming the
module (and package file).

7 years agoimplemented prepostlib.v2_wrapper
Michael D Labriola [Sat, 29 May 2010 02:32:05 +0000]
implemented prepostlib.v2_wrapper

This commit removes the prepostlib.init method and adds a
prepostlib.v2_wrapper class.  Started to add similar changes to
owneroverride, but didn't finish os it's commented out.

While doing this, I also removed some dead code (notes.init, notes.v2,
etc) and fixed up my currently hardcoded config.LIBDIR variables.

7 years agofixing regressions
Michael D Labriola [Mon, 24 May 2010 02:24:32 +0000]
fixing regressions

The v2->v3 translation for source package was pretty broken... fixed a
bunch of stuff here.

- translated build scripts had CFLAGS and SRP_ROOT hardcoded in them
- notes.empty was defined twice...
- fixed notes parsing for v2 dirname runs (we did need addfile_dir!)
- added a bunch of debug code that should be removed... :-/

Now we can really instantiate v2->v3 packags from directory of files
or from previously created packages... but the builder fails to build
them.

7 years agofixed main module and abspath-ized __filename in commit
Michael D Labriola [Sun, 23 May 2010 03:58:10 +0000]
fixed main module and abspath-ized __filename in commit

7 years agoadded a skeletal main.py module
Michael D Labriola [Sun, 23 May 2010 03:26:00 +0000]
added a skeletal main.py module

7 years agomade commit method take an optional dir arg
Michael D Labriola [Sun, 23 May 2010 03:25:15 +0000]
made commit method take an optional dir arg

7 years agoreorg and cleanup
Michael D Labriola [Sun, 23 May 2010 02:00:51 +0000]
reorg and cleanup

This commit does some pretty hefty reorg.  Well, I guess not too
hefty.

- The installer, uninstaller, and builder modules have all been merged
  into a work module (work.builder, work.installer, etc).

- The classes in the package module have been renamed (srp->source,
  brp->binary) and the skeletal forms of the package.installed class
  has been created.

- Added a size method to the package.binary class.  Its return value
  is chaced in self.__size.

7 years agoremoved dead files v3.0.0-alpha1
Michael D Labriola [Fri, 21 May 2010 02:35:43 +0000]
removed dead files

Removed deps.py and files.py since we're just using a map of TarInfo
objects (with additional deps data and forged ownership) instead.

Also removed testing.py... don't really even remember what I was
testing with that.

7 years agocleaned up a bit
Michael D Labriola [Fri, 21 May 2010 02:28:46 +0000]
cleaned up a bit

Updated the README, removed some dead code, and did other misc cleanup.

7 years agofleshed out brp class
Michael D Labriola [Fri, 21 May 2010 02:03:42 +0000]
fleshed out brp class

This commit makes our builder instance successfully return a list of
brp objects.  The brp.__init__ method now can be invoked 2 different
ways to instantiate from disk or use precreated data members (from
builder).  I didn't actually implement the from-disk stuff yet, or the
rest of the brp member functions (commit, etc)

Also fixed up he srp.extract methods a bit, too.  They weren't quite
working well enough to get through the build process.

8 years agotracedmethod only applied if DEBUG on
Michael D Labriola [Thu, 3 Sep 2009 14:23:13 +0000]
tracedmethod only applied if DEBUG on

made the autodec_class metaclass only apply the tracedmethod decorator
if DEBUG is turned on

8 years agomore work on addfile and extractfile
Michael D Labriola [Thu, 3 Sep 2009 14:21:41 +0000]
more work on addfile and extractfile

started this 2 commits ago, but apparently checked it in without
really finishing it.  oops.

added some comments, made the function signatures actually match, and
added the completely missing (but probably unneeded) addfile_dir
method

8 years agoadded utils.dprint method
Michael D Labriola [Sat, 29 Aug 2009 15:56:25 +0000]
added utils.dprint method

replaced all the "if config.DEBUG" print blocks with calls to new
dprint method.  we now have vprint and dprint methods for run-time
configurable debug output for debugging packages (vprint) or srp
itself (dprint)

will add a --debug flag to the main srp program later.

8 years agomade extractfile and addfile methods universal
Michael D Labriola [Thu, 13 Aug 2009 16:16:11 +0000]
made extractfile and addfile methods universal

created versions of extractfile and addfile methods for when we're
extracting from a previously created archive and for when we're
"extracting" from an already unpacked directory of files.

also fixed up some more v3/v2 compatibility stuff

8 years agofixed a few things
Michael D Labriola [Sat, 13 Jun 2009 22:49:57 +0000]
fixed a few things

added __dirname support to addfile and fixed a problem in notes.init

8 years agoadded package.srp.__del__ method
Michael D Labriola [Sat, 13 Jun 2009 20:25:54 +0000]
added package.srp.__del__ method

we now have a destructor to handle deletion of our temporary archive.

8 years agoredid the package.srp.add_file method
Michael D Labriola [Sat, 13 Jun 2009 20:19:17 +0000]
redid the package.srp.add_file method

package.srp.add_file now creates a temporary archive file as a copy of
the original archive, then starts adding files to it.  this way our v2
package on disk won't change when we translate it into a v3 package on
the fly.

also, moved all the chdir(dirname) stuff into a nested extract
method... it was just getting too ugly before.

also cleaned up a bit and took out some debug code

8 years agogot more v2 stuff working
Michael D Labriola [Sat, 13 Jun 2009 14:37:18 +0000]
got more v2 stuff working

srp.package now has an addfile method.  i didn't like the fact that
notes had to be privy to the internal data storage model used by
package in order to add files, so now srp.notes.init is passed the
package instance so it can use extractfile and addfile.  and it's
working now, too.  :-)

srp.package no longer keeps an open tarfile instance.  our extractfile
method creates a new tarfile instance every time it's called.
originally, extractfile closed the tarfile at the end, but that closes
the fileobj as well... so we're leaving these tarfile instances open
indefinately... which is probably a memory leak, but how many times
are we really going to extract files?  maybe a dozen, tops?

we can now successfully instantiate a v3 package object from a v2
package file.  sweet.

8 years agostill working on v2
Michael D Labriola [Sat, 13 Jun 2009 13:45:50 +0000]
still working on v2

fixed rev and srp_flag default args handling in v2_wrapper.  now i
have to remove a bunch of debug code and figure out why my to_add
stuff isn't getting added to the archive

8 years agostill working on v2 stuff
Michael D Labriola [Sat, 13 Jun 2009 13:28:15 +0000]
still working on v2 stuff

don't know if the tar_p additions are working... but that part doesn't
crash.  also, rev isn't getting set correctly and the v2_wrapper
doesn't setup any default filenames (PREPOSTLIB_2.py, OWNEROVERRIDE-2,
etc).  getting there, though

8 years agostill working on v2 compatibility
Michael D Labriola [Sat, 13 Jun 2009 12:33:21 +0000]
still working on v2 compatibility

v2_wrapper.create_v3_files now returns a map of file objects (probably
just NOTES and an install script) to be added to the package's
archive.  still not quite sure how to get them added...

8 years agotrying to figure out how to do v2 compatibility
Michael D Labriola [Fri, 12 Jun 2009 00:42:56 +0000]
trying to figure out how to do v2 compatibility

8 years agofixed srp.commit method
Michael D Labriola [Mon, 8 Jun 2009 18:56:15 +0000]
fixed srp.commit method

srp.commit() now creates a correctly named package file when needed.
a new file is not created if there aren't any timestamp, perms, or
file changes

8 years agoadded package.srp.commit method
Michael D Labriola [Sun, 7 Jun 2009 20:27:28 +0000]
added package.srp.commit method

this pretty much works... haven't fully tested the upgrade tests and
it's not generating an appropriate package name yet.  package is
always named "FOO".  ;-)

8 years agoadded extra sanity checking
Michael D Labriola [Sun, 7 Jun 2009 17:35:45 +0000]
added extra sanity checking

__init__ now checks for the presence of sourcefile for each chained
NOTES file.  all other needed files are implicitly checked because
they're needed to instantiate other objects.  also, moved the chdir
inside the looping try/catch block so that we can chdir(olddir) in a
finally statement.  this means we chdir for each NOTES file, but i
didn't have to worry about getting stuck in the wrong directly when
testing in the interpreter.

8 years agooops
Michael D Labriola [Sun, 7 Jun 2009 17:17:44 +0000]
oops

init wasn't returning to the original cwd after changing to the
specified dir to load files from...  all better

8 years agoseems like that was a good idea
Michael D Labriola [Sun, 7 Jun 2009 17:14:56 +0000]
seems like that was a good idea

swallowed the init code back up into __init__.  the only difference
between loading the package from a committed package file vs loading
it from an unbuilt directory of files is the method of file
"extraction".

8 years agofleshing out package creation
Michael D Labriola [Sun, 7 Jun 2009 17:06:55 +0000]
fleshing out package creation

i might have __init__ do all the work after all.  looks like all i
have to do is use a different extraction method.  commiting this
unless as-is in case i change my mind

8 years agostarting to add package creation code
Michael D Labriola [Sun, 7 Jun 2009 16:50:13 +0000]
starting to add package creation code

changed the arg list for package.srp.__init__ and fleshed out its
docstring.  this function should probably just decide how to
instantiate and let other private methods do the work.

definately not done.  but i have to stop for now

8 years agotrying to make things a bit more sane
Michael D Labriola [Fri, 5 Jun 2009 02:04:11 +0000]
trying to make things a bit more sane

fixed a bug in the owneroverride.init function and tried to make the
init functions a little more consistent.  removed some dead code.
made owneroverride operate on a previously opened file object.  also,
fixed chain iteration bug that was causing the last notes instance to
not get owneroverride and prepostlib instantiated.

8 years agotrying to make things a bit more sane
Michael D Labriola [Fri, 5 Jun 2009 02:04:11 +0000]
trying to make things a bit more sane

decided that notes should not need to access to the storage internals
of package.  neither should prepostlib or any other class.  each
object should be instantiated using an already opened file object.
went through notes and prepostlib ripping out file extraction and
moving that into package.  i've probably broken some/most of the v2
compatibility i had in place before... have to fix that later.

8 years agoadded a bunch of rambling notes
Michael D Labriola [Thu, 4 Jun 2009 17:32:02 +0000]
added a bunch of rambling notes

8 years agoinitial commit from srp CVS repository (export -fr experimental)
Michael D Labriola [Thu, 4 Jun 2009 13:35:12 +0000]
initial commit from srp CVS repository (export -fr experimental)