Commit graph

19 commits

Author SHA1 Message Date
aszlig
6041cfe2af
chromium/source: Move update.nix to parent dir
We now should have only the default.nix left in the source directory and
we can start to factor out the pieces into the Chromium main derivation
attributes.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-03-20 16:53:08 +01:00
aszlig
2d9a604907
chromium: Rename sources.nix to upstream-info.nix
The "sources.nix" also contains information about where to get binary
packages, so calling it "upstream-info.nix" fits better in terms of
naming.

Also, we're moving it away from the sources dir, because the latter will
soon vanish.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-03-20 16:48:54 +01:00
aszlig
a62f100ec3
chromium/update.sh: Allow to be called out-of-tree
Changing the working directory to
pkgs/applications/networking/browsers/chromium is a bit annoying, so
let's make sure the script can be called from anywhere.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-03-13 12:22:18 +01:00
aszlig
28b289efa6
chromium: Refactor updater entirely in Nix
The update.sh shell script now is only a call to nix-build, which does
all the hard work of updating the Chromium source channels and the
plugins. It results in a store path with the new sources.nix that
replaces the already existing sources.nix.

Along the way, this has led to a quite massive workaround, which abuses
MD5 collisions to detect whether an URL is existing, because something
like builtins.tryEval (builtins.fetchurl url) unfortunately doesn't
work. Further explanations and implementation details are documented in
the actual implementation.

The drawback of this is that we don't have nice status messages anymore,
but on the upside we have a more robust generation of the sources.nix
file, which now also should work properly on missing upstream
sources/binaries.

This also makes it much easier to implement fetching non-GNU/Linux
versions of Chromium and we have all values from omahaproxy available as
an attribute set (see the csv2nix and channels attributes in the update
attribute).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-02-26 20:55:17 +01:00
aszlig
459642b8de
chromium/updater: Allow a single plugin arch
Until now, if we have a failure to fetch either the 32bit Debian package
or the 64bit Debian package, neither of these will be put into
sources.nix.

Unfortunately the beta/dev channels do not have a 32bit Debian package,
so even though there is a 64bit Debian package available we don't get
plugins *at* *all*.

This also introduces a nicer error message rather than just failing with
an assertion in fetchurl because we did not provide url/urls.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-02-26 10:55:51 +01:00
William A. Kennington III
370add9d80 chromium: update.sh Shouldn't use cached hashes as they often change upstream for the same version 2015-08-05 19:25:56 -07:00
aszlig
ad770bea67
chromium: Move update.sh back into the main path.
This is to ensure that nothing unexpected will be after the merge of the
refactoring branch, and also my own autoupdate machinery is expecting
this location, so there really is no reason to change it now.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-04-20 17:45:25 +02:00
aszlig
8bc8b51375
chromium: Move source package into own subdir.
Next, we're going to refactor update.sh and the first step is to ensure
that we keep everything related to sources into its own subdirectory to
not clutter up the main directory too much.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-04-19 03:58:44 +02:00
aszlig
777351bce4
chromium/updater: Avoid downgrading versions.
Previously we have just checked for equality. When going back in history, that
way if the history is somewhat out-of-sync, we could end up "updating" to an
older version, which we definitely don't want.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-06-14 17:50:36 +02:00
aszlig
872fb3e2ff
chromium/updater: Fetch more previous versions.
Omahaproxy has an URL which lists a history of the published versions, which
allows to not only go back one versions, but several. Now it is ensured, that we
always have the latest _available_ version in sources.nix.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-06-14 17:50:36 +02:00
aszlig
5a6242a401
chromium/updater: Fall back to previous version.
This is especially annoying for the dev channel, as it happens quite frequently
that tarballs are unavailable. So if fetching the latest version doesn't work,
try the second latest version.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-06-14 17:50:36 +02:00
aszlig
8cf68e5645
chromium/updater: Remove workaround for <= v26.
We no longer need the tar.bz2 archives, so let's remove the switch.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-06-14 17:50:35 +02:00
aszlig
adfc5939a7
chromium: Fix updater for version 26 and newer.
The updater was actually getting the -lite version, which our expression won't
build with, except if we switch some bundled dependencies to those in nixpkgs.

Of course the problem with fetching version 27 was me being stupid and using a
case statement in the updater, as if there won't be any version after 26 ;-)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-03-27 00:26:55 +01:00
aszlig
01cbb17c12
chromium: Fix updater to handle versions > 26.
Starting with version 26, there is a chromium-$version-lite package and it is an
LZMA archive as well, so download size is reduced by about 44%.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-02-08 07:03:36 +01:00
aszlig
bc4318dca3
chromium: Fix omahaproxy URL in updater.
Omahaproxy got an overhaul and thus doesn't give CSV output on the main URL
anymoare. We're switching to /all for now and may want to refine this to only
what we're exactly looking for, but for now it fixes the updater.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2012-11-20 04:55:28 +01:00
aszlig
224098757f
chromium/update.sh: Fix spacing in cache messages.
This commit doesn't add any feature and just fixes a small annoyance which
result in messages like this:

Checking if xxx applies...no.

See that there is no whitespace between "..." and "no"? Well, the world cares
for more important things, but for me personally those minor annoyances can turn
into major annoyances.
2012-08-26 02:52:33 +02:00
aszlig
6968400a34 chromium: Check sha256 per channel in update.sh.
Until this commit we had a single hash of the whole version response from
omahaproxy. This worked well for not updating unnecessarily but only until one
single channel has a new version available.

Unfortunately the dev version is released quite frequently, so the hash is of no
use at all (we could rather directly fetch everything everytime we execute the
script).

This led to this commit, which adds two methods of caching:

First of all, if a perticular version/channel is already in the previous version
of the sources.nix file, don't download it again.

And the second method is to check if the current sha256 is already downloaded
and reads the corresponding sha256 from the lookup table.

So, this should really help to avoid flooding the download servers and to not
stress impatient users too much.
2012-08-17 12:57:34 +02:00
aszlig
ec395a78ee chromium: Extend update script to use channels.
The previos update script just used the last version of chromium that showed up
at the bucket list at:

http://commondatastorage.googleapis.com/chromium-browser-official/

I'm not sure which channel this list actually holds, so I'm going to switch now
using the official release channels grabbed by omahaproxy. This also has the
advantage that we can provide different versions/flavors of chromium.

We now also write our data to sources.nix instead of source.nix, as we have more
than one source.
2012-07-04 14:47:02 +02:00
aszlig
d342672f5a chromium: Add an update script.
It fetches the latest version based on the bucketlist XML from
commondatastorage and generates a "source.nix" which contains an attribute set
about where to fetch the latest version.

The XML is parsed in a somewhat hackish way using sed, but as this is just an
updater, its okay and we don't want to break a fly on the wheel by employing a
full XML parser.
2012-06-22 15:53:28 -04:00