I've been considering releasing (as a patch) a separate nagware version
of Ion, which would have a license without the 28-day clause. The patch
is included as a draft (without any accompanied permission yet to treat
it as an insignificant change). Presently it checks the latest release
redirection [1] every 28 days. An annoying call-home feature, I know,
which would not be featured in the standard release (including my
ZeroInstall feed). As is apparent from the README changes, the patch
requires luacurl [2]. Discuss it if you want. I however doubt that the
unconstructive distros motivated by ideology and maintaining their own
power, would accept even that, although the resulting license should be
"free" (and would be GPLv3 compatible, if based on it intead of LGPLv2.1).
And yet, the package management system is the right place for this kind
of features, not programs themselves (reinventing a half-assed package
management system).
[1]: http://modeemi.fi/~tuomov/ion-3-latest.tar.gz
[2]: http://luaforge.net/projects/luacurl/
--
Tuomo
Sat Dec 29 17:14:55 EET 2007 Tuomo Valkonen <[EMAIL PROTECTED]>
* README and LICENSE updates
Sat Dec 29 15:31:29 EET 2007 Tuomo Valkonen <[EMAIL PROTECTED]>
* Oops
Sat Dec 29 14:23:30 EET 2007 Tuomo Valkonen <[EMAIL PROTECTED]>
* Handle updates better in version check
Sat Dec 29 14:14:09 EET 2007 Tuomo Valkonen <[EMAIL PROTECTED]>
* Only http-check version once every 28 days
Sat Dec 29 13:50:38 EET 2007 Tuomo Valkonen <[EMAIL PROTECTED]>
* Version check hack with luacurl
diff -rN -u old-ion-3-curl/LICENSE new-ion-3-curl/LICENSE
--- old-ion-3-curl/LICENSE 2007-12-29 17:15:04.546539787 +0200
+++ new-ion-3-curl/LICENSE 2007-12-29 17:15:04.590531981 +0200
@@ -11,11 +11,6 @@
- A version that does not significantly differ from one of the
copyright holder's releases, must be provided by default.
- - Versions not based on the copyright holder's latest release (on
- the corresponding "branch", such as Ion3(tm)), must within 28 days
- of this release, be prominently marked as (potentially) obsolete
- and unsupported.
-
- Significantly altered versions may be provided only if the user
explicitly requests for those modifications to be applied, and
is prominently notified that the software is no longer considered
@@ -60,17 +55,6 @@
standard behaviour, are insignificant. Everything else is significant,
unless expressly declared otherwise by the copyright holder.
-Distributions: For example, suppose an aggregate distribution of software
-provides an `installpkg` command for installing packages. Then the action
-`installpkg ion3` (resp. `installpkg ion`) should provide the latest release
-of Ion3 (resp. the latest stable release) 28 days from release date at the
-latest, or prominently notify the user that the provided version is (likely
-to be) obsolete and unsupported. The latest release being provided by
-default, or prominently appearing in a listing, constitutes prominent
-marking of earlier releases as obsolete. Specific versions (including
-modified versions) may be provided if the user explicitly requests for
-those, within the constraints set above.
-
The intent of these terms is to curb the power that "distributions", as
the primary sources of software for many users, have in defining what
is perceived as Ion. By providing significantly modified versions and
diff -rN -u old-ion-3-curl/README new-ion-3-curl/README
--- old-ion-3-curl/README 2007-12-29 17:15:04.546539787 +0200
+++ new-ion-3-curl/README 2007-12-29 17:15:04.594531272 +0200
@@ -16,8 +16,9 @@
with, of course, standard X11 and libc stuff).
* GNU make <http://www.gnu.org/software/make/>
- * Lua 5.1 <http://www.lua.org/>
* gettext <http://www.gnu.org/software/gettext/>
+ * Lua 5.1 <http://www.lua.org/>
+ * luacurl <http://luaforge.net/projects/luacurl/>
2. Edit `system.mk` to suit your system. Most GNU/Linux users should
need very few changes.
diff -rN -u old-ion-3-curl/ioncore/ioncore_ext.lua
new-ion-3-curl/ioncore/ioncore_ext.lua
--- old-ion-3-curl/ioncore/ioncore_ext.lua 2007-12-29 17:15:04.550539077
+0200
+++ new-ion-3-curl/ioncore/ioncore_ext.lua 2007-12-29 17:15:04.570535529
+0200
@@ -93,3 +93,103 @@
TR("Context menu:")
TR("Main menu:")
end
+
+--
+-- Version check
+--
+
+
+local msgwins={}
+
+local function disp(msg)
+ local binding=META.."Escape"
+
+ local scrs={}
+ local function ds(scr)
+ scrs[scr]=true
+ return true
+ end
+ ioncore.region_i(ds, "WScreen")
+
+ for scr, _ in pairs(scrs) do
+ local foo=scr:attach_new{
+ type="WInfoWin",
+ sizepolicy="southeast",
+ unnumbered=true,
+ level=10,
+ passive=true,
+ }
+ -- Hack: attach_new doesn't get geometries right if we pass msg
+ -- directly to it.
+ foo:set_text(msg.." ["..binding.."]", scr:geom().w)
+ msgwins[foo]=true
+ end
+
+ local function hide()
+ for msgwin, _ in pairs(msgwins) do
+ msgwin:rqclose()
+ end
+ ioncore.defbindings("WScreen", {kpress(binding, nil)})
+ end
+
+ ioncore.defbindings("WScreen", {kpress(binding, hide)})
+end
+
+----
+
+local vinfo=ioncore.read_savefile('vcheck')
+local version=ioncore.version()
+
+----
+
+local curlok, err = pcall(function() return require('curl') end)
+
+if not curlok then
+ ioncore.warn(err)
+end
+
+local function do_vcheck()
+ vinfo=nil
+ if curl then
+ local latest
+
+ local function procheader(s, l)
+ --local v=string.match(s,
"^Location:.*/ion%-3.?.?%-(%d%d%d%d%d%d%d%d)%.")
+ local v=string.match(s, "^Location:.*/ion%-([^.]*)")
+ if v then
+ latest=v
+ end
+ return l, nil
+ end
+
+ c=curl.easy_init()
+ c:setopt(curl.OPT_URL,
'http://modeemi.fi/~tuomov/dl/ion-3-latest.tar.gz')
+ --c:setopt(curl.OPT_URL,'http://iki.fi/tuomov/dl/ion-3-latest.tar.gz')
+ c:setopt(curl.OPT_HEADERFUNCTION, procheader)
+ c:setopt(curl.OPT_NOBODY, 1)
+ c:perform()
+
+ if latest then
+ vinfo={time=os.time(), latest=latest, version=version}
+ ioncore.write_savefile('vcheck', vinfo)
+ end
+ end
+end
+
+----
+
+local VCHECK_SECS=28*24*60*60 -- 28 days
+local dt=os.difftime(os.time(), vinfo.time)
+
+local vinfo_ok=(vinfo and vinfo.time and vinfo.latest and
vinfo.version==version)
+
+if (not vinfo_ok) or dt > VCHECK_SECS or dt < 0 then
+ do_vcheck()
+end
+
+if not vinfo then
+ disp(TR("Unable to check version. This version of Ion3 may be obsolete and
unsupported."))
+elseif vinfo.latest~=version --[[and version~="(snapshot)"]] then
+ disp(TR("Latest version is %s. This version of Ion3 is obsolete and
unsupported.",
+ vinfo.latest))
+end