From ba9bcba32f8dc6725e1447f6a10a92637c41e278 Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 15 Mar 2024 07:02:22 +0000 Subject: [PATCH 01/24] Do not hardcode appstream version --- chroot_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chroot_build.sh b/chroot_build.sh index cf73369..f5a9bf0 100755 --- a/chroot_build.sh +++ b/chroot_build.sh @@ -67,5 +67,5 @@ sudo find miniroot/ -type f -executable -name 'bsdtar' -exec cp {} out/bsdtar-$A sudo find miniroot/ -type f -executable -name 'desktop-file-install' -exec cp {} out/desktop-file-install-$ARCHITECTURE \; sudo find miniroot/ -type f -executable -name 'desktop-file-validate' -exec cp {} out/desktop-file-validate-$ARCHITECTURE \; sudo find miniroot/ -type f -executable -name 'update-desktop-database' -exec cp {} out/update-desktop-database-$ARCHITECTURE \; -sudo cp miniroot/appstream-0.12.9/prefix/bin/appstreamcli out/appstreamcli-$ARCHITECTURE +sudo cp miniroot/appstream-*/prefix/bin/appstreamcli out/appstreamcli-$ARCHITECTURE sudo rm -rf miniroot/ From 2dffc0e7c6bd3737191e3b6574853deea05c74c7 Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 15 Mar 2024 07:04:29 +0000 Subject: [PATCH 02/24] v1.0.2 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 5b55964..da0a041 100755 --- a/build.sh +++ b/build.sh @@ -97,7 +97,7 @@ make liblmdb.a install -D -m 644 liblmdb.a /usr/local/lib/liblmdb.a install -D -m 644 lmdb.h /usr/local/include/lmdb.h cd - -wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v0.12.9.tar.gz +wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz cd appstream-*/ # Ask for static dependencies From 26cd9ce4136e3b201c77e8679b6477a18067cba5 Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 15 Mar 2024 07:14:58 +0000 Subject: [PATCH 03/24] Update alpine Newst appstream needs newest meson, argh --- chroot_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chroot_build.sh b/chroot_build.sh index f5a9bf0..e09f699 100755 --- a/chroot_build.sh +++ b/chroot_build.sh @@ -6,7 +6,7 @@ set -ex # Download and extract minimal Alpine system ############################################# -wget "http://dl-cdn.alpinelinux.org/alpine/v3.15/releases/${ARCHITECTURE}/alpine-minirootfs-3.15.4-${ARCHITECTURE}.tar.gz" +wget "http://dl-cdn.alpinelinux.org/alpine/v3.19/releases/${ARCHITECTURE}/alpine-minirootfs-3.19.1-${ARCHITECTURE}.tar.gz" sudo rm -rf ./miniroot true # Clean up from previous runs mkdir -p ./miniroot cd ./miniroot From f8d300e31f9d633c731dd12fba8dfbc55328ce36 Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 15 Mar 2024 07:23:45 +0000 Subject: [PATCH 04/24] appstream now needs curl? --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index da0a041..3a77a62 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf +apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-static # Compile liblmdb from source as Alpine only ship it as a .so wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz tar xf openldap-LMDB_*.tar.gz From 08ce225eb1f450dbc1394db3a1f8dee4e439ed3d Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 15 Mar 2024 07:28:43 +0000 Subject: [PATCH 05/24] curl-dev --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 3a77a62..6094aaa 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-static +apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-static curl-dev # Compile liblmdb from source as Alpine only ship it as a .so wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz tar xf openldap-LMDB_*.tar.gz From 3440f5c4df288df689058d9e1d12ec680bfe78a3 Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 15 Mar 2024 07:35:28 +0000 Subject: [PATCH 06/24] --without-curl --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 6094aaa..1bdeeab 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-static curl-dev +apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf # Compile liblmdb from source as Alpine only ship it as a .so wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz tar xf openldap-LMDB_*.tar.gz @@ -107,7 +107,7 @@ sed -i -e "s|subdir('po/')||" meson.build sed -i -e "s|subdir('docs/')||" meson.build sed -i -e "s|subdir('tests/')||" meson.build # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false +CFLAGS=-no-pie LDFLAGS=-static meson setup build --without-curl --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From 00f737af0a81138c046893b5f3fa0d2b6af93bb2 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 15:59:06 +0100 Subject: [PATCH 07/24] curl-dev curl-static curl --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 1bdeeab..8d85f5a 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf +apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl # Compile liblmdb from source as Alpine only ship it as a .so wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz tar xf openldap-LMDB_*.tar.gz @@ -107,7 +107,7 @@ sed -i -e "s|subdir('po/')||" meson.build sed -i -e "s|subdir('docs/')||" meson.build sed -i -e "s|subdir('tests/')||" meson.build # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --without-curl --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false +CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From 5437ab662ee7d5bc4ba2fb0304f2ac2bfca17616 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 16:01:56 +0100 Subject: [PATCH 08/24] libxmlb-dev --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 8d85f5a..82a982a 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl +apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev # Compile liblmdb from source as Alpine only ship it as a .so wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz tar xf openldap-LMDB_*.tar.gz From 0aea9a2b259a58e4bd26cc93bb0e90f2fda90f01 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 17:17:06 +0100 Subject: [PATCH 09/24] trap 'cat ...meson-log.txt' EXIT --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 82a982a..827d0e5 100755 --- a/build.sh +++ b/build.sh @@ -88,6 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli +trap 'cat /appstream-1.0.2/build/meson-logs/meson-log.txt' EXIT apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev # Compile liblmdb from source as Alpine only ship it as a .so wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz From 0e561507ab9a839f73b03621abffcb4e5058c42c Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 20:54:37 +0100 Subject: [PATCH 10/24] Don't edit meson.build, remove liblmdb --- build.sh | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/build.sh b/build.sh index 827d0e5..65f5b98 100755 --- a/build.sh +++ b/build.sh @@ -90,25 +90,11 @@ cd ../.. # Build appstreamcli trap 'cat /appstream-1.0.2/build/meson-logs/meson-log.txt' EXIT apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev -# Compile liblmdb from source as Alpine only ship it as a .so -wget https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.29/openldap-LMDB_0.9.29.tar.gz -tar xf openldap-LMDB_*.tar.gz -cd openldap-LMDB_*/libraries/liblmdb -make liblmdb.a -install -D -m 644 liblmdb.a /usr/local/lib/liblmdb.a -install -D -m 644 lmdb.h /usr/local/include/lmdb.h -cd - wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz cd appstream-*/ -# Ask for static dependencies -sed -i -E -e "s|(dependency\('.*')|\1, static: true|g" meson.build -# Disable po, docs and tests -sed -i -e "s|subdir('po/')||" meson.build -sed -i -e "s|subdir('docs/')||" meson.build -sed -i -e "s|subdir('tests/')||" meson.build # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false +CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Ddefault_library=static # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From a181fd94f1e85d97f3a72e543b2bad4539bc668a Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 20:58:41 +0100 Subject: [PATCH 11/24] Remove --default-library in favor of -Ddefault_library --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 65f5b98..75b7844 100755 --- a/build.sh +++ b/build.sh @@ -94,7 +94,7 @@ wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar. tar xf appstream.tar.gz cd appstream-*/ # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Ddefault_library=static +CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Ddefault_library=static # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From 238768011d8d514c7e6dc2bba5ce6b7e70fc36dd Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 21:23:23 +0100 Subject: [PATCH 12/24] Build alpine-systemd, argh! --- build.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 75b7844..75e6bc5 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,17 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -trap 'cat /appstream-1.0.2/build/meson-logs/meson-log.txt' EXIT +# https://github.com/Artox/alpine-systemd +apk add alpine-sdk git findutils +adduser -G abuild abuild +mkdir -p /var/cache/distfiles +chown abuild:abuild /var/cache/distfiles +su - abuild +abuild-keygen -a -i +git clone https://github.com/Artox/alpine-systemd.git +cd alpine-systemd +abuild -r +find ~/packages/user -name 'libsystemd-dev-*.apk' -type f -exec apk add --allow-untrusted {} + apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz From ebbc121d76d5758927e1ddbbbfa7770b9cb33baf Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 21:33:34 +0100 Subject: [PATCH 13/24] useradd -m -g abuild abuild The original command asks for a password interactively, which does not work on CI --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 75e6bc5..0ed24a2 100755 --- a/build.sh +++ b/build.sh @@ -89,8 +89,8 @@ cd ../.. # Build appstreamcli # https://github.com/Artox/alpine-systemd -apk add alpine-sdk git findutils -adduser -G abuild abuild +apk add alpine-sdk git findutils shadow +useradd -m -g abuild abuild # adduser -G abuild abuild mkdir -p /var/cache/distfiles chown abuild:abuild /var/cache/distfiles su - abuild From c635bfbe79d22ccc6f6f82d20abc0350d75926c7 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 21:52:00 +0100 Subject: [PATCH 14/24] Do not use abuild user --- build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 0ed24a2..0c8eb60 100755 --- a/build.sh +++ b/build.sh @@ -90,15 +90,13 @@ cd ../.. # Build appstreamcli # https://github.com/Artox/alpine-systemd apk add alpine-sdk git findutils shadow -useradd -m -g abuild abuild # adduser -G abuild abuild mkdir -p /var/cache/distfiles -chown abuild:abuild /var/cache/distfiles -su - abuild abuild-keygen -a -i git clone https://github.com/Artox/alpine-systemd.git cd alpine-systemd abuild -r find ~/packages/user -name 'libsystemd-dev-*.apk' -type f -exec apk add --allow-untrusted {} + +# End of alpine-systemd apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz From f556cbd3e503b55d91f20196771a471b1235d393 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 21:57:57 +0100 Subject: [PATCH 15/24] abuild-keygen -a -i -n --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 0c8eb60..4834ef6 100755 --- a/build.sh +++ b/build.sh @@ -91,7 +91,7 @@ cd ../.. # https://github.com/Artox/alpine-systemd apk add alpine-sdk git findutils shadow mkdir -p /var/cache/distfiles -abuild-keygen -a -i +abuild-keygen -a -i -n git clone https://github.com/Artox/alpine-systemd.git cd alpine-systemd abuild -r From 698b0ef139f5864e44b2d4d57c226045686d6d47 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 21:59:36 +0100 Subject: [PATCH 16/24] -Dsystemd=false --- build.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/build.sh b/build.sh index 4834ef6..76742e8 100755 --- a/build.sh +++ b/build.sh @@ -88,21 +88,12 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -# https://github.com/Artox/alpine-systemd -apk add alpine-sdk git findutils shadow -mkdir -p /var/cache/distfiles -abuild-keygen -a -i -n -git clone https://github.com/Artox/alpine-systemd.git -cd alpine-systemd -abuild -r -find ~/packages/user -name 'libsystemd-dev-*.apk' -type f -exec apk add --allow-untrusted {} + -# End of alpine-systemd apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz cd appstream-*/ # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Ddefault_library=static +CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Dsystemd=false -Ddefault_library=static # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From c860f3dbfdc0121b5c671e012dd385bef61d4552 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:02:46 +0100 Subject: [PATCH 17/24] itstool is also needed --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 76742e8..fd4ca0c 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev +apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev itstool wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz cd appstream-*/ From faa9c3bc94d77d06e445081bbce8353faea1d0ff Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:14:24 +0100 Subject: [PATCH 18/24] libxmlb-static is missing, need to build our own --- build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index fd4ca0c..4374ba3 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,16 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl libxmlb-dev itstool +apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl itstool # libxmlb-dev +# libxmlb-static is missing, need to build our own +wget https://github.com/hughsie/libxmlb/releases/download/0.3.15/libxmlb-0.3.15.tar.xz +tar xf libxmlb-0.3.15.tar.xz +cd libxmlb-* +meson build --default-library=static +ninja -C build +ninja -C build install +ldconfig +cd - wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz cd appstream-*/ From e393f6860cb5dcf634909d1e77bcf60e549df5e7 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:20:47 +0100 Subject: [PATCH 19/24] -Dintrospection=false -Dgtkdoc=false -Dcli=false --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4374ba3..67a5093 100755 --- a/build.sh +++ b/build.sh @@ -93,7 +93,7 @@ apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-s wget https://github.com/hughsie/libxmlb/releases/download/0.3.15/libxmlb-0.3.15.tar.xz tar xf libxmlb-0.3.15.tar.xz cd libxmlb-* -meson build --default-library=static +meson build --default-library=static -Dintrospection=false -Dgtkdoc=false -Dcli=false ninja -C build ninja -C build install ldconfig From ca2eba198484e6ce9575d719d789f60839364324 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:23:57 +0100 Subject: [PATCH 20/24] # ldconfig # segfaults --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 67a5093..dc33379 100755 --- a/build.sh +++ b/build.sh @@ -96,7 +96,7 @@ cd libxmlb-* meson build --default-library=static -Dintrospection=false -Dgtkdoc=false -Dcli=false ninja -C build ninja -C build install -ldconfig +# ldconfig # segfaults cd - wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar.gz # Keep at v1.0.x so as to not have a moving target tar xf appstream.tar.gz From 58358b524fa56e707c3a20e8d5f0b7f5b7b09868 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:29:49 +0100 Subject: [PATCH 21/24] Remove --Ddefault-library in favor of -default_library In an effort to fix `/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: attempted static link of dynamic object '/usr/lib/libglib-2.0.so'` --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index dc33379..0702a89 100755 --- a/build.sh +++ b/build.sh @@ -102,7 +102,7 @@ wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar. tar xf appstream.tar.gz cd appstream-*/ # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Dsystemd=false -Ddefault_library=static +CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Dsystemd=false -default_library=static # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From e9a78a252a4b325477cd871446d5a7a7d970dba7 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:33:17 +0100 Subject: [PATCH 22/24] Fix typo in -default-library=static --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 0702a89..2186c73 100755 --- a/build.sh +++ b/build.sh @@ -102,7 +102,7 @@ wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar. tar xf appstream.tar.gz cd appstream-*/ # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Dsystemd=false -default_library=static +CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Dsystemd=false -default-library=static # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From ad64a7124ee032a376966429a37ec82d7afc3fa5 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:36:36 +0100 Subject: [PATCH 23/24] --default-library=static with 2 dashes --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 2186c73..6f00e8b 100755 --- a/build.sh +++ b/build.sh @@ -102,7 +102,7 @@ wget -O appstream.tar.gz https://github.com/ximion/appstream/archive/v1.0.2.tar. tar xf appstream.tar.gz cd appstream-*/ # -no-pie is required to statically link to libc -CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Dsystemd=false -default-library=static +CFLAGS=-no-pie LDFLAGS=-static meson setup build --buildtype=release --default-library=static --prefix="$(pwd)/prefix" --strip -Db_lto=true -Db_ndebug=if-release -Dstemming=false -Dgir=false -Dapidocs=false -Dinstall-docs=false -Dsystemd=false # Install in a staging enviroment meson install -C build file prefix/bin/appstreamcli From 3432b93527c7a64f5a8044b1e206fa8720edfe15 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 25 Mar 2024 22:54:50 +0100 Subject: [PATCH 24/24] libxml2-static --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 6f00e8b..dc99eb3 100755 --- a/build.sh +++ b/build.sh @@ -88,7 +88,7 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd ../.. # Build appstreamcli -apk add glib-static meson libxml2-dev yaml-dev yaml-static gperf curl-dev curl-static curl itstool # libxmlb-dev +apk add glib-static meson libxml2-dev libxml2-static yaml-dev yaml-static gperf curl-dev curl-static curl itstool # libxmlb-dev # libxmlb-static is missing, need to build our own wget https://github.com/hughsie/libxmlb/releases/download/0.3.15/libxmlb-0.3.15.tar.xz tar xf libxmlb-0.3.15.tar.xz