Commit c176e3f4 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev
Browse files

Converted to shared build system

parent c86ca4d5
[submodule "build-system"]
path = build-system
url = https://git.iszf.irk.ru/certo/build-system.git
[submodule "packages/ImageMagick"]
path = packages/ImageMagick
url = https://git.iszf.irk.ru/certo/ImageMagick.git
[submodule "packages/apr"]
path = packages/apr
url = https://git.iszf.irk.ru/certo/apr.git
[submodule "packages/apr-util"]
path = packages/apr-util
url = https://git.iszf.irk.ru/certo/apr-util.git
[submodule "packages/cifs-utils"]
path = packages/cifs-utils
url = https://git.iszf.irk.ru/certo/cifs-utils.git
[submodule "packages/composer"]
path = packages/composer
url = https://git.iszf.irk.ru/certo/composer.git
[submodule "packages/freetype"]
path = packages/freetype
url = https://git.iszf.irk.ru/certo/freetype.git
[submodule "packages/graphviz"]
path = packages/graphviz
url = https://git.iszf.irk.ru/certo/graphviz.git
[submodule "packages/icu4c"]
path = packages/icu4c
url = https://git.iszf.irk.ru/certo/icu4c.git
[submodule "packages/imagick"]
path = packages/imagick
url = https://git.iszf.irk.ru/certo/imagick.git
[submodule "packages/libjpeg-turbo"]
path = packages/libjpeg-turbo
url = https://git.iszf.irk.ru/certo/libjpeg-turbo.git
[submodule "packages/libpng"]
path = packages/libpng
url = https://git.iszf.irk.ru/certo/libpng.git
[submodule "packages/libtirpc"]
path = packages/libtirpc
url = https://git.iszf.irk.ru/certo/libtirpc.git
[submodule "packages/libxml2"]
path = packages/libxml2
url = https://git.iszf.irk.ru/certo/libxml2.git
[submodule "packages/libxslt"]
path = packages/libxslt
url = https://git.iszf.irk.ru/certo/libxslt.git
[submodule "packages/linux"]
path = packages/linux
url = https://git.iszf.irk.ru/certo/linux.git
[submodule "packages/mariadb"]
path = packages/mariadb
url = https://git.iszf.irk.ru/certo/mariadb.git
[submodule "packages/nfs-utils"]
path = packages/nfs-utils
url = https://git.iszf.irk.ru/certo/nfs-utils.git
[submodule "packages/openldap"]
path = packages/openldap
url = https://git.iszf.irk.ru/certo/openldap.git
[submodule "packages/optipng"]
path = packages/optipng
url = https://git.iszf.irk.ru/certo/optipng.git
[submodule "packages/php"]
path = packages/php
url = https://git.iszf.irk.ru/certo/php.git
[submodule "packages/rpcbind"]
path = packages/rpcbind
url = https://git.iszf.irk.ru/certo/rpcbind.git
[submodule "packages/rpcsvc-proto"]
path = packages/rpcsvc-proto
url = https://git.iszf.irk.ru/certo/rpcsvc-proto.git
[submodule "packages/scons"]
path = packages/scons
url = https://git.iszf.irk.ru/certo/scons.git
[submodule "packages/serf"]
path = packages/serf
url = https://git.iszf.irk.ru/certo/serf.git
[submodule "packages/sqlite"]
path = packages/sqlite
url = https://git.iszf.irk.ru/certo/sqlite.git
[submodule "packages/subversion"]
path = packages/subversion
url = https://git.iszf.irk.ru/certo/subversion.git
[submodule "packages/talloc"]
path = packages/talloc
url = https://git.iszf.irk.ru/certo/talloc.git
[submodule "packages/unzip"]
path = packages/unzip
url = https://git.iszf.irk.ru/certo/unzip.git
[submodule "packages/yasm"]
path = packages/yasm
url = https://git.iszf.irk.ru/certo/yasm.git
Subproject commit 66b926ff6301a78a89c268d5dae9a7d6bb62f024
This diff is collapsed.
Subproject commit 2e21a75c7ba0c3ca00817689e8be5467d2bb5b42
etc
/etc/.*
headers
/usr/include/.*
man
/usr/share/man/.*
bin
/usr/share/ImageMagick-7/.*
/usr/bin/.*
doc
/usr/share/doc/.*
lib
/usr/lib/lib.*
/usr/lib/ImageMagick-7.*
/usr/lib/perl5/.*
pkg
/usr/lib/pkgconfig/.*
all:
tar xf ImageMagick-7.0.4-8.tar.xz
cd ImageMagick-7.0.4-8 && ./configure --prefix=/usr --sysconfdir=/etc --enable-hdri --with-modules --with-perl --disable-static --without-jpeg
$(MAKE) -C ImageMagick-7.0.4-8
$(MAKE) -C ImageMagick-7.0.4-8 DOCUMENTATION_PATH=/usr/share/doc/imagemagick-7.0.4 install
rm -rf ImageMagick-7.0.4-8
all: packages
current_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
all: default
orange-pi-plus-2e:
$(MAKE) packages BOOT_PACKAGES="linux.opiplus2e"
......@@ -14,9 +12,40 @@ raspberry-pi-3-b:
qemu-kvm64:
$(MAKE) packages BOOT_PACKAGES="linux.kvm64"
BASE_PACKAGES = data-collector mariadb mariadb.temporary cifs-utils optipng php talloc libjpeg-turbo yasm libpng freetype icu4c openldap composer subversion \
apr-util sqlite apr serf scons ImageMagick imagick libxml libxslt nfs-utils libtirpc rpcsvc-proto rpcbind \
unzip graphviz.temporary
p4-630:
$(MAKE) packages BOOT_PACKAGES="linux.p4-630"
i3-540:
$(MAKE) packages BOOT_PACKAGES="linux.i3-540"
i5-3317u:
$(MAKE) packages BOOT_PACKAGES="linux.i5-3317u"
i5-8500:
$(MAKE) packages BOOT_PACKAGES="linux.i5-8500"
i7-2600:
$(MAKE) packages BOOT_PACKAGES="linux.i7-2600"
e2-6110:
$(MAKE) packages BOOT_PACKAGES="linux.e2-6110"
xeon-5130:
$(MAKE) packages BOOT_PACKAGES="linux.xeon-5130"
xeon-e5620:
$(MAKE) packages BOOT_PACKAGES="linux.xeon-e5620"
xeon-x5650:
$(MAKE) packages BOOT_PACKAGES="linux.xeon-x5650"
xeon-e3-1271:
$(MAKE) packages BOOT_PACKAGES="linux.xeon-e3-1271"
TEMPORARY_PACKAGES = mariadb.temporary graphviz.temporary
BASE_PACKAGES = data-collector mariadb cifs-utils optipng php talloc libjpeg-turbo yasm libpng freetype icu4c openldap composer subversion \
apr-util sqlite apr serf scons ImageMagick imagick libxml2 libxslt nfs-utils libtirpc rpcsvc-proto rpcbind unzip
data-collector: composer php imagick subversion unzip mariadb.temporary graphviz.temporary
rpcbind: libtirpc
......@@ -27,89 +56,8 @@ apr-util: apr openldap
subversion: apr-util sqlite serf
optipng: libpng
libjpeg-turbo: yasm
libsxslt: libxml
libsxslt: libxml2
php: libjpeg-turbo libpng freetype icu4c openldap libxslt mariadb
cifs-utils: talloc
PACKAGES = $(BASE_PACKAGES) $(BOOT_PACKAGES)
.PHONY: packages set-version $(PACKAGES) cleanup success
packages: set-version $(PACKAGES) cleanup success
set-version: os-release
@echo "$$OS_RELEASE" > /etc/os-release
@echo "127.0.0.1 localhost $(HOSTNAME)" > /etc/hosts
hostname $(HOSTNAME)
@echo "$(HOSTNAME)" > /etc/hostname
sed -i "s/DEVICE_REVISION=.*/DEVICE_REVISION='$(ARTIFACT_NAME)-$(BUILD_ID)'/" /etc/device_info
os-release:
define OS_RELEASE
# Begin /etc/os-release
NAME="Data collector for Radio Astronomy Observatory"
ID=Data-collector-irkutsk
PRETTY_NAME="$(PRETTY_NAME)"
ANSI_COLOR=0;33
VERSION=$(VERSION)
VERSION_ID=$(BUILD_ID)
# End /etc/os-release
endef
export OS_RELEASE
$(PACKAGES):
mkdir root
mkdir work
mkdir mnt
mount -t overlay -o lowerdir=/,upperdir=root,workdir=work overlay mnt
mount -t devtmpfs /dev mnt/dev
mount -t devpts /dev/pts mnt/dev/pts
mount -t tmpfs /dev/shm mnt/dev/shm
mount -t proc /proc mnt/proc
mount -t sysfs /sysfs mnt/sys
mount -t tmpfs /tmp mnt/tmp
mount -t tmpfs /tmp mnt/var/tmp
mount /dev/$(SECONDARY)1 mnt/build
if [ -d mnt/data ] ; then \
mount /dev/$(DISK)4 mnt/data ; \
fi
chroot mnt $(MAKE) -C $(current_dir)$(firstword $(subst ., ,$@)) $(word 2, $(subst ., ,$@))
if [ -d mnt/data ] && [[ $$(findmnt -M mnt/data) ]] ; then \
umount -l mnt/data ; \
fi
umount -l mnt/build
umount -l mnt/var/tmp
umount -l mnt/tmp
umount -l mnt/sys
umount -l mnt/proc
umount -l mnt/dev/shm
umount -l mnt/dev/pts
umount -l mnt/dev
umount -l mnt
rm -rf work
rm -rf mnt
mkdir -p /usr/share/packages
find root -type f -exec strip --strip-unneeded '{}' ';' 2> /dev/null
find root -type f -exec md5sum '{}' ';' | sed -e 's/ root/ /' >> /usr/share/packages/$@.md5
if [ -s /usr/share/packages/$@.md5 ] ; then \
if [ -f /build/packages/$(firstword $(subst ., ,$@))/$@.groups ] ; then \
cp /build/packages/$(firstword $(subst ., ,$@))/$@.groups /usr/share/packages ; \
fi ; \
for f in `find root -type l | sed -e 's/^root//'`; do rm -rf $$f; done ; \
cp -rdf --remove-destination root/* / ; \
else \
rm -f /usr/share/packages/$@.md5 ; \
fi
rm -rf root
cleanup:
rm -rf /kernelconfig
rm -rf /tmp/*
/sbin/fstrim -v /
success:
touch /.success
include Makefile.common
Subproject commit cf36e41f3f4342d433d7a2bd828738cc45bc048b
Subproject commit c13ead4a51ff65c05973d0d91e75c999bfb27a83
all:
tar xf apr-util-1.6.0.tar.bz2
patch -Np1 -d apr-util-1.6.0 < apr-util-1.6.0-gdbm.patch
cd apr-util-1.6.0 && ./configure --prefix=/usr --with-apr=/usr --with-gdbm=/usr --with-openssl=/usr --with-crypto --with-ldap=ldap
$(MAKE) -C apr-util-1.6.0
$(MAKE) -C apr-util-1.6.0 test
$(MAKE) -C apr-util-1.6.0 install
rm -rf apr-util-1.6.0
--- apr-util-1.6.0/dbm/apr_dbm_gdbm.c 2018/02/25 16:36:31 1825311
+++ apr-util-1.6.0-gdbm/dbm/apr_dbm_gdbm.c 2018/02/25 16:41:11 1825312
@@ -36,8 +36,20 @@
static apr_status_t g2s(int gerr)
{
if (gerr == -1) {
- /* ### need to fix this */
- return APR_EGENERAL;
+ if (gdbm_errno == GDBM_NO_ERROR)
+ return APR_SUCCESS;
+ return APR_OS_START_USEERR + gdbm_errno;
+ }
+
+ return APR_SUCCESS;
+}
+
+static apr_status_t gdat2s(datum d)
+{
+ if (d.dptr == NULL) {
+ if (gdbm_errno == GDBM_NO_ERROR || gdbm_errno == GDBM_ITEM_NOT_FOUND)
+ return APR_SUCCESS;
+ return APR_OS_START_USEERR + gdbm_errno;
}
return APR_SUCCESS;
@@ -53,22 +65,14 @@
static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said)
{
- apr_status_t rv = APR_SUCCESS;
-
- /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */
+ dbm->errcode = dbm_said;
- if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) {
+ if (dbm_said == APR_SUCCESS)
dbm->errmsg = NULL;
- }
- else {
- dbm->errmsg = gdbm_strerror(gdbm_errno);
- rv = APR_EGENERAL; /* ### need something better */
- }
-
- /* captured it. clear it now. */
- gdbm_errno = GDBM_NO_ERROR;
+ else
+ dbm->errmsg = gdbm_strerror(dbm_said - APR_OS_START_USEERR);
- return rv;
+ return dbm_said;
}
/* --------------------------------------------------------------------------
@@ -107,7 +111,7 @@
NULL);
if (file == NULL)
- return APR_EGENERAL; /* ### need a better error */
+ return APR_OS_START_USEERR + gdbm_errno;
/* we have an open database... return it */
*pdb = apr_pcalloc(pool, sizeof(**pdb));
@@ -141,10 +145,12 @@
if (pvalue->dptr)
apr_pool_cleanup_register(dbm->pool, pvalue->dptr, datum_cleanup,
apr_pool_cleanup_null);
+ else
+ pvalue->dsize = 0;
/* store the error info into DBM, and return a status code. Also, note
that *pvalue should have been cleared on error. */
- return set_error(dbm, APR_SUCCESS);
+ return set_error(dbm, gdat2s(rd));
}
static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key,
@@ -201,9 +207,11 @@
if (pkey->dptr)
apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
apr_pool_cleanup_null);
+ else
+ pkey->dsize = 0;
/* store any error info into DBM, and return a status code. */
- return set_error(dbm, APR_SUCCESS);
+ return set_error(dbm, gdat2s(rd));
}
static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
@@ -221,9 +229,11 @@
if (pkey->dptr)
apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
apr_pool_cleanup_null);
+ else
+ pkey->dsize = 0;
/* store any error info into DBM, and return a status code. */
- return set_error(dbm, APR_SUCCESS);
+ return set_error(dbm, gdat2s(rd));
}
static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
headers
/usr/include/.*
bin
/usr/bin/.*
lib
/usr/lib/apr-util-1/.*
/usr/lib/aprutil\.exp
/usr/lib/lib.*
pkg
/usr/lib/pkgconfig/.*
all:
tar xf apr-1.6.3.tar.bz2
patch -Np1 -d apr-1.6.3 < apr-1.6.3-tests.patch
cd apr-1.6.3 && ./configure --prefix=/usr --disable-static --with-installbuilddir=/usr/share/apr-1/build
$(MAKE) -C apr-1.6.3
# $(MAKE) -C apr-1.6.3 test
$(MAKE) -C apr-1.6.3 install
rm -rf apr-1.6.3
diff -uNr apr-1.6.3/test/sendfile.c apr-1.6.3-tests/test/sendfile.c
--- apr-1.6.3/test/sendfile.c 2013-10-15 00:15:05.000000000 +1030
+++ apr-1.6.3-tests/test/sendfile.c 2018-08-04 05:58:03.904131883 +0930
@@ -463,7 +463,7 @@
/* in case this is the non-blocking test, set socket timeout;
* we're just waiting for EOF */
- rv = apr_socket_timeout_set(sock, apr_time_from_sec(3));
+ rv = apr_socket_timeout_set(sock, apr_time_from_sec(60));
if (rv != APR_SUCCESS) {
aprerr("apr_socket_timeout_set()", rv);
}
headers
/usr/include/.*
bin
/usr/share/.*
/usr/bin/.*
lib
/usr/lib/lib.*
/usr/lib/apr\.exp
pkg
/usr/lib/pkgconfig/.*
Subproject commit 2a11baeacae68290582cf83b403b1ba5ec2dd95c
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment