aboutsummaryrefslogtreecommitdiffstats
path: root/main/xen/APKBUILD
blob: 94227bea85a8f5d113bf1d68ecdefbb47ea30db5 (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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xen
pkgver=4.5.0
pkgrel=0
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
arch="x86_64"
license="GPL"
depends="syslinux bash iproute2 logrotate"
depends_dev="openssl-dev python-dev e2fsprogs-dev gettext zlib-dev ncurses-dev
	dev86 texinfo perl iasl pciutils-dev glib-dev yajl-dev
	spice-dev gnutls-dev curl-dev libaio-dev lzo-dev xz-dev util-linux-dev
	e2fsprogs-dev linux-headers"
makedepends="$depends_dev autoconf automake libtool"
install=""
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-hypervisor"
source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
	xsa117.patch
	xsa118-4.5-unstable-1.patch
	xsa118-4.5-unstable-2.patch
	xsa119-unstable.patch
	xsa121.patch
	xsa122.patch
	xsa123.patch
	xsa125.patch
	xsa126-qemut.patch
	xsa126-qemuu.patch
	xsa127-4.x.patch
	xsa132.patch
	xsa133-qemut.patch
	xsa133-qemuu.patch

	qemu-coroutine-gthread.patch
	qemu-xen-musl-openpty.patch
	qemu-xen_paths.patch

	hotplug-vif-vtrill.patch
	0001-ipxe-dont-clobber-ebp.patch
	gnutls-3.4.0.patch

	init-xenstore-domain.patch

	musl-support.patch
	musl-hvmloader-fix-stdint.patch
	stdint_local.h
	elf_local.h

	xen-hotplug-lockfd.patch
	xen-fd-is-file.c

	xenstored.initd
	xenstored.confd
	xenconsoled.initd
	xenconsoled.confd
	xendomains.initd
	xendomains.confd
	xen-consoles.logrotate
	xenqemu.confd
	xenqemu.initd
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"

	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	# install our stdint_local.h and elf_local.h
	install "$srcdir"/stdint_local.h "$srcdir"/elf_local.h \
		"$_builddir"/tools/firmware/ || return 1

	# remove all -Werror
	msg "Eradicating -Werror..."
	find . -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g' \
		|| return 1

	msg "Updating config.sub..."
	update_config_sub || return 1

	msg "Autoreconf..."
	autoreconf || return 1

	unset CFLAGS
	unset LDFLAGS
}

# Unset CFLAGS and LDFLAGS because the xen build system
# doesn't support them. Instead use .config in xen root
# folder if necessary.
munge_cflags() {
	msg "Munging CFLAGS..."

	unset CFLAGS
	unset LDFLAGS
	unset LANG
	unset LC_ALL
}

# These tasks are added as separate tasks to enable a packager
# to invoke specific tasks like building the hypervisor.  i.e.
#    $ abuild configure build_tools
configure() {
	cd "$_builddir"

	msg "Running configure..."
	./configure --prefix=/usr \
		--build=$CBUILD \
		--host=$CHOST \
		|| return 1
}

build_hypervisor() {
	munge_cflags

	msg "Building hypervisor..."
	make xen || return 1
}

build_tools() {
	munge_cflags

	msg "Building tools..."
	make tools || return 1
}

build_docs() {
	munge_cflags

	msg "Building documentation..."
	make docs || return 1
}

build_stubdom() {
	munge_cflags

	msg "Building stub domains..."
	make stubdom || return 1
}

build() {
	cd "$_builddir"

	configure || return 1
	build_hypervisor || return 1
	build_tools || return 1
	build_docs || return 1
	build_stubdom || return 1

	${CC:-gcc} -o xen-fd-is-file "$srcdir"/xen-fd-is-file.c
}

package() {
	cd "$_builddir"

	unset CFLAGS
	unset LDFLAGS

	make -j1 DESTDIR="$pkgdir" install-xen install-tools install-docs \
		install-stubdom || return 1

	# remove default xencommons
	rm -rf "$pkgdir"/etc/init.d/xencommons

	for i in $source; do
		case $i in
		*.initd) install -Dm755 "$srcdir"/$i \
				"$pkgdir"/etc/init.d/${i%.*};;
		*.confd) install -Dm644 "$srcdir"/$i \
				"$pkgdir"/etc/conf.d/${i%.*};;
		esac
	done
	install -Dm644 "$srcdir"/xen-consoles.logrotate \
		"$pkgdir"/etc/xen/xen-consoles.logrotate

	install -m755 xen-fd-is-file "$pkgdir"/usr/lib/xen/bin/xen-fd-is-file
}

libs() {
	pkgdesc="Libraries for Xen tools"
	replaces="xen"
	depends=
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.so.* \
		"$pkgdir"/usr/lib/fs \
		"$subpkgdir"/usr/lib/
}

hypervisor() {
	pkgdesc="Xen hypervisor"
	depends=
	mkdir -p "$subpkgdir"
	mv "$pkgdir"/boot "$subpkgdir"/
}

md5sums="9bac43d2419d05a647064d9253bb03fa  xen-4.5.0.tar.gz
d43cf4b2da680dcf709714863c4f06ed  xsa117.patch
27c7fd9e385440bed2d0f33d8f27c065  xsa118-4.5-unstable-1.patch
7816e8ea4718d79e65acd890bb9a6aed  xsa118-4.5-unstable-2.patch
a96d0463ddf52699dc908908398d5960  xsa119-unstable.patch
ee80cffba0b858712d1e3eedf5df7775  xsa121.patch
8d46ed3846559a5492f686b4fe0fa4d4  xsa122.patch
4b98895abd06f41cdc2cf0e98ea05308  xsa123.patch
620fb94e090d7d735c3d96310c627972  xsa125.patch
941b4cb7f2a8ba31bf08ab5425891902  xsa126-qemut.patch
1ee5f45ecda3513e8a9708b2edf5141d  xsa126-qemuu.patch
c7d2d6913945100b5048e5149d0f6af2  xsa127-4.x.patch
896d814b803427d72781cd9a1e11ebd2  xsa132.patch
c1b7aaa9c5e729b61712d27d1f9fae6a  xsa133-qemut.patch
fdb8ba32313a5b8088773ffcfd865ae7  xsa133-qemuu.patch
de1a3db370b87cfb0bddb51796b50315  qemu-coroutine-gthread.patch
dd8603eaab5857816843bfc37647d569  qemu-xen-musl-openpty.patch
08bfdf8caff5d631f53660bf3fd4edaf  qemu-xen_paths.patch
e449bb3359b490804ffc7b0ae08d62a0  hotplug-vif-vtrill.patch
229539a822e14a6a62babffd71ecfbf3  0001-ipxe-dont-clobber-ebp.patch
a0a0294eccbaef77a2f8f5c2789f011c  gnutls-3.4.0.patch
08a30d56902b660f5102a5c208e545c9  init-xenstore-domain.patch
0984e3000de17a6d14b8014a3ced46a4  musl-support.patch
513456607a2adfaa0baf1e3ae5124b23  musl-hvmloader-fix-stdint.patch
c9313a790faa727205627a1657b9bf06  stdint_local.h
c13f954d041a6fa78d0d241ad1780c0b  elf_local.h
750138c31ec96d1a11fe0c665ac07e9e  xen-hotplug-lockfd.patch
649f77b90978cd2b6d506ac44ec6c393  xen-fd-is-file.c
4aeda68bf5b168019762fcf6edb661d3  xenstored.initd
d86504e12f05deca6b3eeeb90157160e  xenstored.confd
d1dd5fc9a8b00f7373d789f9b5a605b9  xenconsoled.initd
ec2252c72050d7d5870a3a629b873ba6  xenconsoled.confd
647f13e411e52431ac4fb75c35cfcd21  xendomains.initd
dcdd1de2c29e469e834a02ede4f47806  xendomains.confd
9df68ac65dc3f372f5d61183abdc83ff  xen-consoles.logrotate
6a2f777c16678d84039acf670d86fff6  xenqemu.confd
e1c9e1c83a5cc49224608a48060bd677  xenqemu.initd"
sha256sums="5bdb40e2b28d2eeb541bd71a9777f40cbe2ae444b987521d33f099541a006f3b  xen-4.5.0.tar.gz
5d7c1ec3bd604ed49999a56fefeebda1206f424b1b48c0e44899f13bc1e55cd0  xsa117.patch
ee24a4c5e12b67d7539f08b644080c87797f31b4402215cd4efbbc6114bffc25  xsa118-4.5-unstable-1.patch
bd532e3cd535fcdea51f43631a519012baff068cb62d2205fc25f2c823f031eb  xsa118-4.5-unstable-2.patch
ee44c8f6a7cf3ca7b2d9886047b91690aaa2b091baf8629d8ab4c298022c6c47  xsa119-unstable.patch
e74afb34e8059e8ee25b803019c192aa47c29208af2c19fb81aa84b0d7c0d268  xsa121.patch
13404ef363ee347db1571ee91afaa962a68e616a7596c2441a29e26f6db9ec47  xsa122.patch
994cf1487ec5c455fce4877168901e03283f0002062dcff8895a17ca30e010df  xsa123.patch
be0c7cceb1af4b7b1341f37c1e20cf804ea3ac7d3c2ca2e5599f936479d5e0de  xsa125.patch
791c288379fcd8b30ee473d42f1113c8ffa5f244dd82df9db6cc4597c81155b7  xsa126-qemut.patch
bbb8c840f3ef182508cff36803d861f15923325075ccc58801673b23dfc1a169  xsa126-qemuu.patch
e5fd3c126ae10fe45283e6eb1a4216b75057f1772d869d2b3a26398b0984c7bd  xsa127-4.x.patch
329d4edf1e1133795ece41f2fc8887c5f4cc06b42ced63c810c610b17bcee46d  xsa132.patch
8d8c82fedf4beb6ad1a27002c1d3fb3031e43a732316e2049ec5d04939c159bc  xsa133-qemut.patch
032481a153d80192112e42f704dc7180aeb995a12d3ddef0efec4eb87c044079  xsa133-qemuu.patch
3941f99b49c7e8dafc9fae8aad2136a14c6d84533cd542cc5f1040a41ef7c6fe  qemu-coroutine-gthread.patch
fe76c7c8faf686060b20491bfed4a13ce37b1bc3dcdbf33d242e388cee14c7c1  qemu-xen-musl-openpty.patch
e4e5e838e259a3116978aabbcebc1865a895179a7fcbf4bad195c83e9b4c0f98  qemu-xen_paths.patch
dd1e784bc455eb62cb85b3fa24bfc34f575ceaab9597ef6a2f1ee7ff7b3cae0a  hotplug-vif-vtrill.patch
751ef06569de66578b8713dc170976832b0671ac2696f32eb9ad69d60332d594  0001-ipxe-dont-clobber-ebp.patch
e25d38376e22f6f935d2c0ce1b9d6e6b47ff261b5e6056bc3b47168739d7a992  gnutls-3.4.0.patch
0204d69804e83864cd6b2122f51b9c1940588158a35c159a7ef0c3b8fb0af4cb  init-xenstore-domain.patch
2fea4ceec8872f5560023fa135e3ff03d6deee4299e53d3a33ec59c31779b2c5  musl-support.patch
479b9605e85c865be6117b6d1993124dbbb7da7f95d0e896e4c0fe5cdfeb74d3  musl-hvmloader-fix-stdint.patch
6b4ad2a9fdb3e23b06c8c1961a46b06c15a46471fe6fb13cdc269da37466f334  stdint_local.h
7f1ed2db24d8eba87a08eea0601a9ab339209906fdfa74c8c03564a1a6e6471e  elf_local.h
b183ed028a8c42a64e6fd3fb4b2b6dad832f52ed838fceb69bf681de4e7d794f  xen-hotplug-lockfd.patch
d0b3e5f282a07878341c38f40d01041ed37623757a99d6e0a420ca64d1f4ef2a  xen-fd-is-file.c
90a8fc315bfe305581b3873890b1c1c8da6f62b5d06b73b79bac7a74671bbb07  xenstored.initd
991bb7c9da02941556e29714bd96b26e39e57e0a5b514eadd78d9bfa3fa5a9dc  xenstored.confd
d13719093a2c3824525f36ac91ac3c9bd1154e5ba0974e5441e4a2ab5e883521  xenconsoled.initd
2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060  xenconsoled.confd
00e8ca5adfc3aeedcb4ae14e98956cabaa7852a8babf7426f2e704195585b117  xendomains.initd
046540c36328809fc351ad209d2b40300f91581d6d46da0caf79f57f2c212285  xendomains.confd
0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19  xen-consoles.logrotate
4cfcddcade5d055422ab4543e8caa6e5c5eee7625c41880a9000b7a87c7c424e  xenqemu.confd
c92bbb1166edd61141fdf678116974209c4422daf373cdd5bc438aa4adb25b8d  xenqemu.initd"
sha512sums="31621fbaf621ad350125d03366ecff4dec5d810b0c1242ca0e28788f7556ac1443d7ee9247e1f76dec07e148e0b4ae16d08a7c10101bb78d6529375f3e40998e  xen-4.5.0.tar.gz
517dfa702d6c80816d27bbc8fb55e6cd72856e157e6a18ff2d13b310f9173f8bb23940e43bb85acf41fd035e7415597f237c1d2805c87ff1e5c37c49ab4d4ed0  xsa117.patch
4074546aab41f9a9093b0bc1124e02d443402c1976484797c3ef59bc5cfa84202e22c5247eb99b0f0a7b0918a6d79ff612b1c59f0e5154bc79926c553e784f91  xsa118-4.5-unstable-1.patch
5a11cac98ee70d3bfc86a9096b2007c0bbf000b4abf6e53aaf7cb574ac59dcc39a31585bf85f58349b3c94535ef3abf0ddfced20af723dcc4a03a288dfc550a6  xsa118-4.5-unstable-2.patch
96c782934f52a1e541909270e88f38b22335ccb20562cefa068ad2b6713011cdeb0cb9d3ad9523a6ae1c52703b62f57fae53a7986b518a73a094719475a2e9db  xsa119-unstable.patch
c58967af871518340745fd9023822ec4cc42c90c7f99f5e91eaec2da33476f50819ac84f70a38bafcd26cd60909ea9f54920606ec970150e3c2b5b28ee021883  xsa121.patch
723e9c2d12a5c6a9acac3c3feba06cb811e9af4949d6b5f75814fff89fef7e53bc90fe1562b70a5983f72ec623fe14fb2f83f4b23039cf83f50c9cc337ab22d3  xsa122.patch
1ebcfa74a1922656584fdd6c46563a88e7e76320e6605bdda837f8710872e5b2144c86a57c8246e7b33c7b7f344ce068807a7da5ecbc07c231ae61959e43290d  xsa123.patch
cf05a33319018093003a72d3187d361c893490cd6728b9a3e3adf2d925287c838eae16554f8f5d4e2ffef3199e3da28ff7573fa5211b2246f0d3d2da30ff5130  xsa125.patch
b65565d1e8fd0a41a683c22664cc024b9193f733f7029a4421730a63c23190ff4d6d3afb7bfddcccd290c8986b866d989e6ddfa9c5d99f6aa73e0516c2d2d511  xsa126-qemut.patch
5ade1fb69e48d12b60fc867b00a59dcd94d3db264c9f3cf6937551ef142fd37285ba59b81b95883f16b21d287fda5eef5f114df155fef059ba97535168fd358a  xsa126-qemuu.patch
598761b014cf17fa9ee1ac56ad7cf5c27cda208e180b471d2946a14079886c60448c6f2e7e0633bd1d85b5737af2a4e76b7377e58726f617e982c5c5395f03d9  xsa127-4.x.patch
23d4fb293c678b8b0a6c48cbd696761bd35179e56c7d9b1d8090006241e33dc5cc4d77a2598f27dd3943a9d13a38c6b21714d2a639e6f9c0d86a0a5c747becee  xsa132.patch
a06bf522ab6076fbb5869e9a5f1aba37d41fba21d8a327b85ea315ca8814cb959fef2d3458c7f6d2b758eb5a4b7b54ed81b14bb80512205eb2a90d46ca432f95  xsa133-qemut.patch
fc97003d6817fa44dac7e72db1b5bdb0905a138d65caf12f8b1e3cd5855b3b8d441caf95f7c902f36b4c21c862148ab31e45b6ef1ffd22c25875a04cb29c9911  xsa133-qemuu.patch
c3c46f232f0bd9f767b232af7e8ce910a6166b126bd5427bb8dc325aeb2c634b956de3fc225cab5af72649070c8205cc8e1cab7689fc266c204f525086f1a562  qemu-coroutine-gthread.patch
a8b7378516172389450834985e8558d7a86d7cd808154bdc846bb98325e40fc4e87b1fc6d725297f4bef6eb54ebcbcbfa4d9d0363d83f635755795fb0726e006  qemu-xen-musl-openpty.patch
1936ab39a1867957fa640eb81c4070214ca4856a2743ba7e49c0cd017917071a9680d015f002c57fa7b9600dbadd29dcea5887f50e6c133305df2669a7a933f3  qemu-xen_paths.patch
f095ea373f36381491ad36f0662fb4f53665031973721256b23166e596318581da7cbb0146d0beb2446729adfdb321e01468e377793f6563a67d68b8b0f7ffe3  hotplug-vif-vtrill.patch
c3a1b270347a99c8ce21118010ad8d817b4462a31cc5c75352faa7086969ef0646f3f4d0922d85c2e504cff091ce7e9fe79c92f983c2ba4af2fae85c52c3835a  0001-ipxe-dont-clobber-ebp.patch
e9b88234bd67c2d65fcda1a56deeaf60aaa4c8b2afff128028c6a1478c89f828584dab1ac04f8d9d53cf17d26572e5505d0bbfcc4b2a6842cc749c6c018c0e51  gnutls-3.4.0.patch
475eb800660dc928914b8c15562f18f24d6e7a76f4cc7bed9249ce52d444c29aec1aef843eb37ade0c7c9616195bbbc1606a3195e25b2bd4b6a1d1af5f69256e  init-xenstore-domain.patch
76bd60768b296752ca11195bb03a57584686461da45255cb540977111a73c42b5b92362fd46d97bfd20487c96971dd5aed7eae7d8bf1aad7d5199adb875d4962  musl-support.patch
08cf7fac825dd3da5f33856abf6692da00d8928ab73050b3ae0a643ddb97c8ae323238a80152fd31595ac1c31678d559232264258c189e2c05ecaf33e295f13e  musl-hvmloader-fix-stdint.patch
9dcb481c5b83c7df23e87be717d8a9234014f26a0f80893e125fe8110e2923562d95162d18ff64c08b5782cd7c085f90378a9e0802b3995c077c8ba32bbb669f  stdint_local.h
853467a2d055c5bfbdc7bdca175a334241be44a7c5ac3c0a84a4bc5463b5c070b66d37e2a557429ef860727a6b7350683af758cc2494d85b6be4d883143a2c0d  elf_local.h
79cb1b6b81b17cb87a064dfe3548949dfb80f64f203cac11ef327102b7a25794549ce2d9c019ebf05f752214da8e05065e9219d069e679c0ae5bee3d090c685e  xen-hotplug-lockfd.patch
e76816c6ad0e91dc5f81947f266da3429b20e6d976c3e8c41202c6179532eec878a3f0913921ef3ac853c5dbad8082da3c9cd53b65081910516feb492577b7fc  xen-fd-is-file.c
52c43beb2596d645934d0f909f2d21f7587b6898ed5e5e7046799a8ed6d58f7a09c5809e1634fa26152f3fd4f3e7cfa07da7076f01b4a20cc8f5df8b9cb77e50  xenstored.initd
093f7fbd43faf0a16a226486a0776bade5dc1681d281c5946a3191c32d74f9699c6bf5d0ab8de9d1195a2461165d1660788e92a3156c9b3c7054d7b2d52d7ff0  xenstored.confd
3c86ed48fbee0af4051c65c4a3893f131fa66e47bf083caf20c9b6aa4b63fdead8832f84a58d0e27964bc49ec8397251b34e5be5c212c139f556916dc8da9523  xenconsoled.initd
30df69cc38d0bed26bc4d6e08a2b62cbdc654d5f663009a05cb3b83b3e3dc5e206362d3fd59abbb753ceb8d6d79eaa6e15d079bb8f4f35dc74667103faf4e85d  xenconsoled.confd
57f353c4f306fdb568bd305a9fdb8ddf925d95512a7643124155047eb4a513f63a721a35beb3d88ff7bfa2a5674406e3738519106b39109a39a9d117c6928aef  xendomains.initd
a3dddcb841a22305cfe1780c4ef6cf1ee67227ca9fe6ca0d24a7cc8be2cff9e5f3fbd75c2faf85e5ce6dc3b73631879ce10e19b02afb4611c72db183e116123a  xendomains.confd
ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426  xen-consoles.logrotate
bdbe15c924071cdc2d0f23e53ba8e3f837d4b5369bfb218abd3405f9bef25d105269aaf0784baeb69c073a5786b8c82ffdfd414e86874da34293cfdc2c497928  xenqemu.confd
8475119369409efb8ad930c7735cd3d782191d18fab4fc322a51120c395162ff88e381182876036d1078afd30079dbf3f94a3568689e9b52ba235adead4b97d3  xenqemu.initd"