[PD-dev] [ pure-data-Patches-3418851 ] read startup config files from /etc/puredata/conf.d

SourceForge.net noreply at sourceforge.net
Fri Oct 7 14:45:35 CEST 2011


Patches item #3418851, was opened at 2011-10-05 05:19
Message generated for change (Comment added) made by zmoelnig
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3418851&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: feature
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Miller Puckette (millerpuckette)
Summary: read startup config files from /etc/puredata/conf.d

Initial Comment:
Hello,

I was looking at using puredata from debian, and currently, it's a bit of a mess, if I want to use PD + gem, I need to install both, and then mess up with config files, or, as the readme suggest (Readme.Debian), launch pd with an extenssive commandline:

| to start Pd with Gem support, issue the command (without the '%' sign)
| 
| % pd -path /usr/lib/pd/extra/Gem -lib Gem
| 
| OR
| 
| use the provided script instead of directly starting Pd:
| 
| % /usr/bin/pd-gem
| 
| OR
| 
| start Pd
| - navigate to "File->Path..." and add "/usr/lib/pd/extra/Gem" to the list of search-paths
| - click OK
| - navigate to "File->Startup..." and add "Gem" to the list of binaries to be loaded
| - click "Apply" and "Save all settings"
| 
| OR 
| 
| add the following lines to your ~/.pdrc file (deprecated)
| 
| -path /usr/lib/pd/extra/Gem
| -lib Gem

I think it'd be better to automatially include a file, that's what this patch is all about (and to be able to make a pd extenssion debian policy).

tell me what you think

----------------------------------------------------------------------

>Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2011-10-07 14:45

Message:
.pdrc? i hope you are aware, that .pdrc has been deprecated or a long time
and the current state of affairs is to use .pdsettings (at least on linux)

as for [declare]: look at the help-patch for [declare], the source-code
(g_canvas.c) and the mailing-list archives for a discussion of its
problems.

----------------------------------------------------------------------

Comment By: https://www.google.com/accounts ()
Date: 2011-10-06 07:40

Message:
@zmoelnig @eighthave: ok it'll be easier to first read
/etc/puredata/pd.conf then ~/.pdrc do you want a patch doing that ?

then, where can I look into [declare] stuff ? (sorry...quite a newbie
here)

but anyway, I guess we'll still need each module to be able to declare how
to load itself,
so I can have the patch say something as easy as:
need gem
need blah

and then pd would look for a descriptor for the 'gem' and 'blah' module,
and load specific files.

so I guess it means 0001 and 0003 and 0004 should get merged, and then we
should build ontop of that ?

----------------------------------------------------------------------

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2011-10-05 20:13

Message:
From the point of view of hardware config, it makes sense to have a global
config, I agree.

----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2011-10-05 18:47

Message:
i think it is good to make it easier to embed preferences in the patch.
i also think that [declare] should be made nicer.

this doesn't keep me from thinking that a global configuration would be a
good idea, esp. when you can configure the (system specific) hardware and
the like.

----------------------------------------------------------------------

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2011-10-05 18:38

Message:
I think that the -conf flag is a good idea and should be included and
generalized for all platforms.  

But I think that the /etc/puredata/conf-enabled stuff is not a good idea
because it serves to reinforce the issues that cause this problem in the
first place.  We should be making it easier for people to embed the
configuration in the patch, by doing things like improving [declare].  We
should not make it easier to move the configuration globally, which means
we have even more patches that are unshareable because they rely on a
custom, global config.  Just look at any other programming language, the
libs that a program needs are declared in the program itself (import,
using, declare, #include, etc), not globally in the user's config.

----------------------------------------------------------------------

Comment By: https://www.google.com/accounts ()
Date: 2011-10-05 17:34

Message:
Ok, so I refreshed my patches to take into account some things said here:
http://core.evilgiggle.com/~xaiki/puredata/
(you can call me xaiki)


0001-give-an-argument-to-sys_rcfile-and-expand-with-realp.patch

hasn't changed, needed for 0002 and 0003

0002-import-configs-form-etc-puredata-conf.d-on-start.patch

will now look into /etc/puredata/conf-enabled
so we can setup an apache/lighttpd like dir with a puredata-conf-enable
script (that we can steal away)

0003-implement-conf-arg-to-specify-config-file.patch

add a -conf argument, using 0001

0004-make-conf-trigger-nopref-so-we-don-t-load-default-if.patch

this will make that -conf argument not use the default conf when
triggered, actually, it could be a bit smarter (i.e. checking if we could
actually read something... but well)

----------------------------------------------------------------------

Comment By: Jonathan Wilkes (jancsika1)
Date: 2011-10-05 16:13

Message:
@h-tee-tee-pee-yes: If you were looking at help patches, the [import]
object is excluded because libdir externals put the binaries in the same
directory as the help patches.

It does seem weird to have to import the import object.

----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2011-10-05 13:09

Message:
note, that even if all your patches were implemented, i would still rather
NOT enable all apt-installed pdlibs by default (i guess i am with hans
here)

instead, the sysadmin ought to decide on a case-by-case basis (something
like apache's /etc/apache2/mods-enabled/)

----------------------------------------------------------------------

Comment By: https://www.google.com/accounts ()
Date: 2011-10-05 12:44

Message:
@zmoelnig: (really, things are easier to discuss via mail =)) 
the first patch only alows to specify a config file from C, yet, we could
easily make it a command line switch to be able to specify a file (or a
directory) to load.

@zmoelnig: I'm a puredata beginer, but I'm concerned that pd-gem allows
you to load only 1 extention at a time, what if you want gem + pidip + xxx
? I don't think it's an elegant solution.

@eighthave: good to know, that said, it doesn't seem widely used, I was
looking at some docs, and some projects and no patch I found was
implementing this, so I think it's easier to fix Debian/PD to include
some/all installed ext, than fix all patches in the wild.


----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2011-10-05 09:31

Message:
about the given patch: this is definitely a nice idea (i haven't looked at
the patch though), and allows to easily switch between predefined flavours
of your installed Pd.


i think it's a way better solution than the config-switcher.sh script that
comes with current Pd-extended, as it doesn't require write access in the
home-directory.

----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2011-10-05 09:21

Message:
@anonymous(how i hate the openID implementation on sf): i don't see how
starting "pd-gem" is "messing up with config files" or "launching "with an
extensive commandline". alternatively, you can always launch pd/Gem from
the menu

@eighthave: using [declare] or [import] is one of many options how to load
library. other ways have their value as well, and i don't think we should
force people to do something (even if we do believe that they should do it)
(and yes, i am not always true to this suggestion myself :-))

finally, the two patches submitted are somewhat independent (though
related):
- having the opportunity to force the use of a given preference file
- implementing an /etc/*/conf.d/ style config cascade

i would suggest submitting them separately.

----------------------------------------------------------------------

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2011-10-05 06:05

Message:
For loading libraries, you should do it directly in the patch using either
[declare -lib] or [import] (apt-get install puredata-import).

----------------------------------------------------------------------

Comment By: https://www.google.com/accounts ()
Date: 2011-10-05 05:22

Message:
ok,... I can't seem to add my second patch,... you can find everything in:
http://core.evilgiggle.com/~xaiki/puredata/

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3418851&group_id=55736



More information about the Pd-dev mailing list