1
0
Fork 0
forked from mirrors/openup
Commit graph

121 commits

Author SHA1 Message Date
Antoine Jacoutot
7b19f54d26 Make sure /etc/openup.conf has sane permissions since it can contain a password to the premium subscription service. 2013-09-25 12:25:02 +02:00
Antoine Jacoutot
cb6f138a3f Make it possible to override openup values using /etc/openup.conf
instead of editing the script directly -- since the script will
need to be overwritten on update.
2013-09-25 11:19:10 +02:00
Antoine Jacoutot
1df35d2367 Remove unneeded check. 2013-09-17 09:30:49 +02:00
Antoine Jacoutot
dccdf883f8 Only output what will be done in dry-run mode.
Factorize evaluation of commands.
Bump VERSION, we want people to test.
2013-09-17 09:28:05 +02:00
Antoine Jacoutot
afd187f805 Make it clear -c only reports but does not change anything on the system. 2013-09-11 22:50:37 +02:00
Antoine Jacoutot
516d9366cc Parse args. 2013-09-09 19:07:43 +02:00
Antoine Jacoutot
4d7d88c634 Ignore the quirks package. 2013-09-04 18:07:41 +02:00
Antoine Jacoutot
f9605878b8 Bump. 2013-09-04 18:01:28 +02:00
Antoine Jacoutot
181612ca78 Run check_openupd() after option parsing (fixes XXX). 2013-09-04 17:59:10 +02:00
Antoine Jacoutot
a3218e28a6 Finish -K implementation. 2013-09-04 17:54:38 +02:00
Antoine Jacoutot
f3a10f3944 Factorize arch -s where it makes sense. 2013-09-04 17:46:00 +02:00
Antoine Jacoutot
88a7c27b82 Implement -K (exclude kernel binpatches). Not working in cron mode yet. 2013-09-04 17:42:19 +02:00
Antoine Jacoutot
94e5b776f2 Optimize check_vuxml() even more:
Before:
    0m25.06s real     0m1.26s user     0m1.39s system

After:
    0m19.17s real     0m0.80s user     0m0.96s system
2013-09-04 17:23:17 +02:00
Antoine Jacoutot
f076032aec Fix mutualy exclusive options parsing. 2013-09-04 16:25:52 +02:00
Antoine Jacoutot
f63604f746 Optimize the way we check vuxml: we only want to run pkg_add -u against
a list of possible candidates, not all of our packages.
This can drasticaly reduce the run in cron mode when lots of packages are installed.
2013-09-04 16:04:21 +02:00
Antoine Jacoutot
1557b975bd More secure mktemp and hide the tmp files. 2013-09-04 15:42:02 +02:00
Antoine Jacoutot
3ec9d8d39d Bump. 2013-09-04 15:38:38 +02:00
Antoine Jacoutot
a8da62da50 Better output in cron mode.
e.g.

--- nginx ---
Available update(s): 1.3.5p2 1.2.3p2 nginx: A problem exists in
nginx if proxy_pass is used with untrusted HTTP backend servers.
The problem may lead to a denial of service or a disclosure of a
worker process memory on a specially crafted response from an
upstream proxied server.
2013-09-04 15:37:13 +02:00
Antoine Jacoutot
eeee076cca Simplify the update check. 2013-09-04 15:00:05 +02:00
Antoine Jacoutot
e30c78e50e Fix run in non dry-run mode.
Add squeleton for the -K option.
2013-09-04 14:53:56 +02:00
Antoine Jacoutot
46ab61d738 Bump. 2013-09-04 14:39:43 +02:00
Antoine Jacoutot
81d5d62ff7 Remove the auto-update feature, one less knob!
The rational is that if the openup URL ever gets compromised, then we are restarting a script which we do not control anymore... and that can lead to obvious catastrophic failures...

Now openup will *always* check if there is an update and if one is available, it will output the command needed to update (but will not run it itself) then exit.
2013-09-04 14:37:37 +02:00
Antoine Jacoutot
fd116b23dd Use the value of TMPDIR if it is defined. 2013-09-04 09:50:47 +02:00
Antoine Jacoutot
a1cc6fb405 Protect variables. 2013-09-04 09:25:06 +02:00
Antoine Jacoutot
41ee3307f5 Remove TODO and bump VERSION. 2013-09-03 11:47:27 +02:00
Antoine Jacoutot
f68e518450 Implement binpatch support in cron (-c) mode.
This finishes the initial implementation of openup...
2013-09-03 11:46:28 +02:00
Antoine Jacoutot
9d4f46f0a8 Remove Ksh'isms. There is no need for it, so use regular Bourne
Shell constructs.
2013-09-03 08:51:30 +02:00
Antoine Jacoutot
996e0b21ea _RUN2 -> noselfupdate
No functionnal change but makes it clearer.
2013-09-02 11:57:44 +02:00
Antoine Jacoutot
8b9507da18 Automatically check for openup update in cron mode.
That means we can add a cronjob for openup and forget about it until:
* new vulnerability applies to us
* current release becomes unsupported
2013-09-02 10:41:22 +02:00
Antoine Jacoutot
1433ebcc1c Make openup -c mutually exclusive with other options. 2013-09-02 09:41:04 +02:00
Antoine Jacoutot
9365aec703 Make the vuxml url configurable in case people are mirroring us. 2013-08-27 16:16:33 +02:00
Antoine Jacoutot
513f943d35 Extend comment. 2013-08-27 15:52:57 +02:00
Antoine Jacoutot
c54a833668 Tweaks. 2013-08-27 15:50:23 +02:00
Antoine Jacoutot
d6c9801637 This deserves a version bump. 2013-08-27 15:44:38 +02:00
Antoine Jacoutot
6dd1490caa Finish vuxml implementation for pkg.
Next step will be binpatches, but it is now time to extensively test this:
'openup -c'

I tried to make the code as simple as possible so that everyone does
not wonder how we parse the xml.
2013-08-27 15:42:03 +02:00
Antoine Jacoutot
7dc9cf031e Simplify and fix regex/parsing to cope with multi-packages. 2013-08-27 15:29:48 +02:00
Antoine Jacoutot
180f052be3 Better regex to match merging packages. 2013-08-27 13:39:38 +02:00
Antoine Jacoutot
b1ccd4ec66 More TODO. No VERSION bump since it's not finished yet. 2013-08-27 13:03:22 +02:00
Antoine Jacoutot
9efbb1531a Remove support for firmwares -- it's pretty useless.
Rework usage and add -c (check/cron option).
Initial implementation of the vuxml parsing - still WIP but seems to work ok (just wear glasses if you want to read the corresponding function)... regex foo!
2013-08-27 13:01:01 +02:00
Antoine Jacoutot
6e63ce4179 Add an outdated_pkg() function -- not used nor finished yet. 2013-08-26 11:40:50 +02:00
Antoine Jacoutot
4e40824649 Minor tweaks. 2013-08-26 11:20:33 +02:00
Antoine Jacoutot
b64e67315a Bump VERSION. 2013-08-20 11:23:59 +02:00
Antoine Jacoutot
6c8c11bfb3 Sanitize variables name.
Make this tool standalone and not rely on externaly set PKG_PATH
or installpath.
2013-08-20 11:22:11 +02:00
Antoine Jacoutot
b27db2f296 Rename some functions. 2013-08-14 10:38:03 +02:00
Antoine Jacoutot
94ed4cae6c Extend usage and doc. 2013-08-14 10:36:28 +02:00
Antoine Jacoutot
806910046d Better regex. 2013-08-13 15:34:25 +02:00
Antoine Jacoutot
6f43e19082 Fix typo.
Output the complete steps taken to update the script when running
in dry run mode.
2013-08-13 14:35:12 +02:00
Antoine Jacoutot
f1c7ac9576 Abort immediately if binpatch from an older release is installed. 2013-08-13 14:15:45 +02:00
Antoine Jacoutot
20d2d91f3a check for pkg.conf installpath and/or PKG_PATH 2013-08-13 14:02:53 +02:00
Antoine Jacoutot
331b94ef66 Clearer output. 2013-08-13 09:39:02 +02:00