aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: e6b0dc225ca61ec2f7485c1a8dc5b4b612956b2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
Automatic Upgrade Helper
========================

This is a utility designed to be used in conjunction with the
OpenEmbedded build system (BitBake and OE-Core) in order to
automatically generate upgrades for recipes based on new versions being
published upstream.


Setup
-----

0. AUH needs all the dependencies listed for Yocto also requires git 
   configured because uses it to save upgrades, you need to have git
   user and email configured, example:

   $ git config --global user.name "Some Name"
   $ git config --global user.email "somename@somedomain.com"

1. Ensure you have a working copy of the build system that is configured
   and ready to run, i.e. you've run the oe-init-build-env script to
   create a build directory and edited local.conf / bblayers.conf as
   desired.

2. Prepare a configuration file, by default in $BUILDDIR/upgrade-helper/
   upgrade-helper.conf, as below:

--------------- snip ---------------
[maintainer_override]
# mails for recipe upgrades will go to john.doe instead of jane.doe, etc
jane.doe@doe.com=john.doe@doe.com
johhny.bravo@bravo.com=john.doe@doe.com

[settings]
# recipes in blacklist will be skipped
blacklist=python glibc gcc

# only recipes belonging to maintainers in whitelist will be attempted
maintainers_whitelist=jane.doe@doe.com john.doe@doe.com johhny.bravo@bravo.com

# SMTP server
smtp=smtp.my-server.com:25

# from whom should the mails arrive
from=upgrade.helper@my-server.com

# who should get the status mail with statistics, at the end
status_recipients=john.doe@doe.com

# specify the directory where work (patches) will be saved (optional)
#workdir=

# publish url to use in statistics summary (optional)
#publish_work_url=http://auh.somehost.com/work

# clean sstate directory before upgrading
clean_sstate=yes

# clean tmp directory before upgrading
clean_tmp=yes

# machines to test build with
machines=qemux86 qemux86-64 qemuarm qemumips qemuppc

# optional features
buildhistory=no
testimage=no
testimage_name=image-custom # defaults to core-image-sato

# to enable upgrade recipes in a layer example for meta-intel
layer_mode=False
layer_name=meta-intel
layer_dir=DIR/meta-intel
layer_machines=intel-core2-32 intel-corei7-64 intel-quark

--------------- snip ---------------

3. Enable distrodata and supply appropriate additional metadata. For
   example, you could add the following to your conf/local.conf:

--------------- snip ---------------
INHERIT =+ "distrodata"
--------------- snip ---------------

WARNING: if you are using the default maintainers.inc file supplied
         with Poky (in meta-yocto) and you don't set a
         maintainers_whitelist or maintainer_override in the
         upgrade-helper configuration as above, and you specify "all"
         on the command line, the script will automatically send out
         emails to the default maintainers. Please be careful not to
         do this :)

4. If you want to enable buildhistory (optional) you need to enable in
upgrade-helper.conf also add the following lines to your conf/local.conf
file:

--------------- snip ---------------
INHERIT =+ "buildhistory"
BUILDHISTORY_COMMIT" = "1"
--------------- snip ---------------

If upgrade is succesful buildhistory diff's are generated into
$BUILDDIR/upgrade-helper/work/recipe/buildhistory-diff.txt.

(Do not remove any other inherited class in the process, e.g. distrodata).

5. If you want to enable testimage (optional) you need to enable in
upgrade-helper.conf also add the following lines to your conf/local.conf
file:

--------------- snip ---------------
INHERIT += "testimage"

DISTRO_FEATURES_append = " ptest"
EXTRA_IMAGE_FEATURES = "debug-tweaks package-management ptest-pkgs"
# testimage/ptest only work with rpm
PACKAGE_CLASSES = "package_rpm"
--------------- snip ---------------

Also if you are running in a server without X11 session, you need to start
a vncserver example:

$ vncserver :1
$ export DISPLAY=:1

If upgrade is succesful testimage/ptest results are generated into
$BUILDDIR/upgrade-helper/work/recipe/ptest_recipe.log if recipe support
ptest.

(Do not remove any other inherited class in the process, e.g. distrodata).

Usage
-----

Some manual usage examples:

* To upgrade the xmodmap recipe to the latest available version,
  interactively:
    $ upgrade-helper.py xmodmap

* To upgrade the xmodmap recipe to a user specified version,
  interactively:
    $ upgrade-helper.py xmodmap -t 1.2.3

* To attempt to upgrade all recipes and automatically send email
  messages to maintainers for each attempted recipe as well as a
  status mail at the end, use:
    $ upgrade-helper.py all

If you wish to run the script on a regular basis, you can set up a cron
job; the "weeklyjob.sh" file distributed with this project is the basis
of a script you can call from a cron job and also provides an example
crontab line.

Maintenance
-----------

The code for this application is maintained by the Yocto Project.

The latest version of the code can always be found here:

  http://git.yoctoproject.org/cgit/cgit.cgi/auto-upgrade-helper/

Contributions are welcome. Please send patches / pull requests to
yocto@yoctoproject.org with '[auh]' in the subject also CC the
current maintainer: Aníbal Limón <anibal.limon@linux.intel.com>.

License
-------

This application is licensed under the GNU General Public License
version 2.0 or (at your option) any later version. Please see the
LICENSE file for further details.