From 2811e08563619ddf1b7441880fc1b85787e54559 Mon Sep 17 00:00:00 2001 From: Christian Hagenest Date: Tue, 7 May 2024 18:29:49 +0200 Subject: [PATCH] WIP --- dovecot-build/README.md | 4 +++- scripts/dovecot/build-obs.sh | 22 ++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/dovecot-build/README.md b/dovecot-build/README.md index 4797e28d..314d7fa2 100644 --- a/dovecot-build/README.md +++ b/dovecot-build/README.md @@ -42,7 +42,9 @@ and is described in the [official documentation](https://openbuildservice.org/he In scripts/dovecot/ is a shell script that prepares the required files and pushes them to build.opensuse.org. -To run it you need osc, debuild and curl installed. Per default it assumes that your local obs repository is located at ~/obs/. +Before using the script, you should have osc set up as described in the [official documentation](https://openbuildservice.org/help/manuals/obs-user-guide/art.obs.bg#sec.obsbg.obsconfig). You need to checkout our repository to ~/obs/ + +The script assumes you are on Debian. It automatically installs any needed build dependencies. Use `source build-obs.sh` to run it. diff --git a/scripts/dovecot/build-obs.sh b/scripts/dovecot/build-obs.sh index c724696f..8a804ee6 100644 --- a/scripts/dovecot/build-obs.sh +++ b/scripts/dovecot/build-obs.sh @@ -1,6 +1,14 @@ #!/bin/bash -# this script requires wget, osc and debuild installed. +# this script requires curl, osc and debuild installed. +# on debian you need to run: apt install devscripts build-essential osc curl + +# Install dependencies +echo "Installing dependencies for this script:" +sudo apt install devscripts build-essential osc curl + +echo "Installing build dependencies" +sudo apt install default-libmysqlclient-dev krb5-multidev libapparmor-dev libbz2-dev libcap-dev libdb-dev libexpat-dev libexttextcat-dev libicu-dev libldap2-dev liblua5.4-dev liblz4-dev liblzma-dev libpam0g-dev libpq-dev libsasl2-dev libsodium-dev libsqlite3-dev libssl-dev libstemmer-dev libsystemd-dev libunwind-dev libwrap0-dev libzstd-dev pkg-config zlib1g-dev # Define path of your local OBS repository OBS_PATH=~/obs/home:deltachat/dovecot/ @@ -23,9 +31,8 @@ git clone https://github.com/chatmail/dovecot.git echo "Building the package..." cd dovecot debuild -us -uc -cd .. -# Copy Files to Your Local OBS Repository, TODO how to do this best? +# Copy Files to Your Local OBS Repository, echo "Copying files to your local OBS repository..." cp dovecot_2.3.21+dfsg1-3.debian.tar.xz $OBS_PATH cp dovecot_2.3.21+dfsg1.orig.tar.gz $OBS_PATH @@ -33,8 +40,11 @@ cp dovecot_2.3.21+dfsg1.orig-pigeonhole.tar.gz $OBS_PATH # Push Changes to OBS echo "Pushing changes to OBS..." -cd /path/to/your/local/obs/repo/ +cd $OBS_PATH +osc up +rm * osc add dovecot_2.3.21+dfsg1-3.debian.tar.xz -osc add -osc add +osc add dovecot_2.3.21+dfsg1.orig.tar.gz +osc add dovecot_2.3.21+dfsg1.orig-pigeonhole.tar.gz + osc commit