mwall <
mw...@users.sourceforge.net> writes:
> packages are typically downstream from the source. of course, if we are
> doing things in the source that make packaging difficult, we'll try to
> address that.
Thanks to you also for taking the time to write back to me. Between your
and Vince's I feel like I understand the big picture now (which if I did
earlier I wouldn't have written what I did).
> the debian and rpm packages use the wee_xxx utilities to help with the
> installation process. that results in consistent configuration file no
> matter how weewx was installed. none of them invoke setup.py to do the
> installation.
This is the part that I didn't expect. You mentioned about things that
make packaging difficult, so I'll try to explain where I'm coming from.
From a packaging viewpoint (coming from lots of other things, not about
weewx), I expect the normal install target to put files in
${DESTDIR}${PREFIX}, and to follow the conventional layouts, so that
when those bits are basically tarred up and then unpacked in the user's
filesystem, they are as expected.
> the locations of executables, skins, etc varies by platform - that is to be
> expected.
Agreed. The canonical example is autoconf that has arguments to set the
various directories. Usually I find that where stuff in /var is put
varies, and /usr/pkg/man/man1 vs /usr/pkg/share/man/man1 are the big
differences.
> if you want to create a package for netbsd (or freebsd or openbsd), then
> you probably want to follow the pattern used by the deb/rpm packages. they
> simply copy files from the source tarball into the appropriate places.
> then they use wee_config to generate the initial weewx configuration file.
> if you prefer, do not do that, and require that the user run wee_config
> directly. it all depends on how much you want the installation to "just
> work" after install.
We have a notion that installing a package is not interactive, so I'd
tend to a README.pkgsrc in the installed docs dir to tell people to run
wee_config.
> for example, the debian package prompts for station type and other
> parameters, since debian package management provides mechanisms to do
> that. the rpm packages, on the other hand, do not. both platforms result
> in a 'dist' version of the weewx.conf file as well as all the permutations
> when a user upgrades and modifies the configuration.
I was thinking the updater/merger could be hooked into install.
> the packages also handle dependencies
yes, that was actually my main goal, to be able to have a package even
if I run a manual install, just to not keep track of the N python modules.
> we have considered splitting weewx.conf into separate files (for example,
> using the xxx.d pattern), but having *all* of the configuration in a single
> file has always won.
I did not mean to raise that as an issue.
> we have been very careful to keep the parts isolated - docs are in a single
> self-contained directory, skins are all in a single directory (but users
> can put them anywhere, if they want), drivers and other code extensions go
> in the user directory, reports end up in a separate directory tree, and the
> entire configuration is in a single config file.
I can see how that was. It was the setup.py install layout not being
aligned with my perception of Linux FHS (which is hier(7) in BSD) that
confused me.
> we made an explicit decision to make a 'python' install of weewx a bit
> non-standard, at least from a python point of view. we don't want weewx
> assets to be dumped into the tree where other python code lives. so a pip
> install is not really appropriate for weewx. we have talked about using
> pypi, but the all-in-a-single-directory pattern for standalone weewx
> install does not really fit with pypi.
Thanks for clarifying - I didn't realize that having setup.py not do the
normal layout was that intentional.
> if you want to see a weewx package for netbsd (or maybe something that
> works for all of the bsd?), consider creating a document that explains how
> someone would create a weewx package for netbsd. write up the steps, and
> enumerate the assets and their locations after an install.
I already made one. Understanding hte grand plan, it has some deficiencies
it puts the setup.py install layout into ${PREFIX}/weewx
it doesn't (yet) have any auto-merging code; the new weewx.conf is in
weewx.conf.DIST and the user's config is initialized from that and
then not modified.
the skins are treated as code and thus just removed/updated rather
than merged; I know people edit these a lot, and reasonably so
I wonder if setup.py build could have a "standalone mode" like it does
now, and a "package mode" that follows the standard layout. But that
may be a lot of churn for minor common subexpression elimination.
I will study the debian/rh files before I ask any more questions!