apt-get

191 views
Skip to first unread message

Gerry Curry

unread,
Mar 16, 2016, 10:24:19 AM3/16/16
to weewx-user
Has anyone ever given thought to making weewx apt-get friendly so all the dependencies get installed automatically? Then we could even do updates through apt-get. It would make life for us less "geeky" guys a whole lot simpler. Just my 2 cents.

Thomas Keffer

unread,
Mar 16, 2016, 10:53:19 AM3/16/16
to weewx-user
Yes, of course we have. But, it would require setting up and managing a signed repository. So far, there have been no volunteers to do that.

-tk

On Wed, Mar 16, 2016 at 7:24 AM, Gerry Curry <ge...@currysystems.com> wrote:
Has anyone ever given thought to making weewx apt-get friendly so all the dependencies get installed automatically? Then we could even do updates through apt-get. It would make life for us less "geeky" guys a whole lot simpler. Just my 2 cents.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mwall

unread,
Apr 16, 2016, 11:18:44 PM4/16/16
to weewx-user
On Wednesday, March 16, 2016 at 10:24:19 AM UTC-4, Gerry Curry wrote:
Has anyone ever given thought to making weewx apt-get friendly so all the dependencies get installed automatically? Then we could even do updates through apt-get. It would make life for us less "geeky" guys a whole lot simpler. Just my 2 cents.

what does this look like from a user point of view?

the apt approach requires initial configuration at the client.  this only has to be done once:
sudo echo "deb [arch=all] http://weewx.com/apt/ squeeze main" > /etc/apt/sources.list.d/weewx.list
wget http://weewx.com/keys/mwall_test.gpg.key
sudo apt-key add mwall_test.gpg.key

for comparison, this is the install process via dpkg then via apt-get:

the dpkg approach (currently document in docs/debian.html):
1) download the .deb
wget http://weewx.com/downloads/weewx-x.y.z_r.deb
2) install the .deb
sudo dpkg -i weewx-x.y.z_r.deb
3) fix dependencies and finish install (only if dependencies not already installed)
sudo apt-get update
sudo apt-get -f install

the apt-get approach (requires a repo with weewx debs in it):
1) install
sudo apt-get update
sudo apt-get install weewx

similarly, here is the update process:

dpkg approach:
1) download
wget http://weewx.com/downloads/weewx-x.y.z_r.deb
2) update
sudo dpkg -i weewx-x.y.z_r.deb

apt-get approach:
1) update
sudo apt-get update
sudo apt-get install weewx

as an added benefit, when apt-get works with a weewx repo, then all of the other apt tools work as well, such as the gui-based package managers and aptitude.

what does this cost us in maintenance?  there are many options for managing an apt repo, from manual manipulation to (overly) simplified scripts.  i've been experimenting with the 'aptly' tool, which seems to have a nice balance between simplicity and capability.

each time weewx is released, someone must add the .deb to the apt repository and publish it.  it basically boils down to three or four command lines for each release (these are now documented in DEV_NOTES.txt).  the biggest problem is the integration with the weewx.com service provider.  if they provided rsync, or if they provided server-side apt repo tools, then this would be trivial to maintain.  since they do not, we would have to write a (fairly simple) script to propagate the repo changes on each release.

i have installed weewx 3.0.0 through 3.5.0 in an apt repo at weewx.com so you can test.  warning!  do the testing on a non-production system!  when i tried in on a deb7 system with aptitude, it pulled in build-essential as an indirect weewx dependency.  i think that is due to a suggested requirement of apache2 in the weewx control file.  the actual weewx dependencies are, in fact, minimal.

i cannot commit to supporting the apt repo until there is a way to automate the update process.

m

vince

unread,
Apr 17, 2016, 11:09:14 AM4/17/16
to weewx-user
On Wednesday, March 16, 2016 at 7:24:19 AM UTC-7, Gerry Curry wrote:
Has anyone ever given thought to making weewx apt-get friendly so all the dependencies get installed automatically? Then we could even do updates through apt-get. It would make life for us less "geeky" guys a whole lot simpler. Just my 2 cents.

You have to have a certain amount of geek cred to run Linux :-)
For initial installs you're asking for a lot of work to prevent stuff people need to do 'once'.

Here's the weewx prerequisite steps for a Debian Vagrant box which has a very minimal as a starting point:

# 1. get the repo contents upstream
sudo apt-get update

# 2. get current - can take a while depending on your starting point
# sudo apt-get upgrade

# 3. get ancillary stuff we always use that is not in the debian vagrant base box
sudo apt-get install -y sqlite3 lynx wget curl procps nginx ntp

# 4. get weewx prerequisites
sudo apt-get install -y python-configobj python-cheetah python-imaging python-serial python-usb python-dev

# 5. optional for weewx - this will slow your install down
# sudo apt-get install -y python-pip
# sudo pip install pyephem

# 6. install the webserver of your choosing....

You're asking for a lot of Tom/Matthew work to let you skip step 4.  Only.


mwall

unread,
Apr 17, 2016, 9:02:26 PM4/17/16
to weewx-user
On Sunday, April 17, 2016 at 11:09:14 AM UTC-4, vince wrote:
You're asking for a lot of Tom/Matthew work to let you skip step 4.  Only.

thanks for watching our backs, vince. but i think there is more to it than just the number of steps.

if any of the steps is particularly error-prone or can result in a tangled web of troubleshooting, then it might be worth eliminating that step.

for example, in the install instructions, if we simply document the wget command for downloading the weewx tarball instead of providing a link to weewx.com/downloads, we might eliminate all of the problems where people do the download using internet explorer then get confused because ie uncompressed it or because they don't know how to get the tarball to their rpi or whatever.

having an apt repo for weewx definitely simplifies both the install and upgrade processes, without compromising the dpkg approach.  (influx does this too - see https://docs.influxdata.com/influxdb/v0.12/introduction/installation/ - and it is far more complicated than weewx)

my big concern is the process for maintaining an apt repo, i.e., replicating aptly output to weewx.com.  if we cannot automate it, then it is too much overhead.

of course, we do not want to document a zillion different ways of downloading and installing.  we should stick to the basic process, then those with super geek fu will be able to figure out their own variants.

finally, there is some impedance matching to remember.  weewx via .deb is already easy to install (compare to the struggles of cumulusmx or wdconsoled where they are fighting .net/mono dependencies or funky init scripts).  then noobs from the land of clicky-click trip over editing a text file to change the configuration (compare to clicking a box in a dialog).  weather-display does not really make it any easier with its convoluted dialogs.  however, i can imagine a _basic_ gui that does minimal weewx configuration such as choosing a driver, selecting uploads, selecting reports, and monitoring status.  put that in the apt repo as a separate weewx-admin package.

m

mwall

unread,
Apr 17, 2016, 9:11:02 PM4/17/16
to weewx-user
if you want to test the apt repo, this is how to do it:

do this once to tell apt where to find weewx:

curl -s http://weewx.com/keys/mwall_test.gpg.key | sudo apt-key add -
sudo echo "deb [arch=all] http://weewx.com/apt/ squeeze main" > /etc/apt/sources.list.d/weewx.list

do this to install or upgrade weewx:


sudo apt-get update
sudo apt-get install weewx

feedback is appreciated

m

vince

unread,
Apr 18, 2016, 10:02:13 AM4/18/16
to weewx-user
On Sunday, April 17, 2016 at 6:02:26 PM UTC-7, mwall wrote:
 i can imagine a _basic_ gui that does minimal weewx configuration such as choosing a driver, selecting uploads, selecting reports, and monitoring status.  put that in the apt repo as a separate weewx-admin package.


My recollection is a couple years ago the gui question came up, and the idea was to go with the packages rather than fight all the runtime dependencies needed to do a gui.   FWIW, the old wview gui worked ok, but I could never find what I was looking for in the blasted thing.

If you kept the feature creep waaaaay down for a hypothetical weewx gui, sure I could see it maybe helping. Problem re: a gui is always privileges to read/write the config file(s) and reset the service, and weewx needing to talk to the hardware itself.

vince

unread,
Apr 18, 2016, 10:06:18 AM4/18/16
to weewx-user
On Sunday, April 17, 2016 at 6:11:02 PM UTC-7, mwall wrote:
if you want to test the apt repo, this is how to do it:

do this once to tell apt where to find weewx:

curl -s http://weewx.com/keys/mwall_test.gpg.key | sudo apt-key add -
sudo echo "deb [arch=all] http://weewx.com/apt/ squeeze main" > /etc/apt/sources.list.d/weewx.list


rpm variant would be very similar if you wanted to consider going there.....
 - download and install the rpm signing key just once
 - install a hypothetical "weewx-release" rpm containing the /etc/yum.repos.d file pointing to your repo



 
Reply all
Reply to author
Forward
0 new messages