WIP build-obs.sh

This commit is contained in:
Christian Hagenest
2024-05-06 13:54:12 +02:00
committed by missytake
parent 6e1477666e
commit 846a4066d8
2 changed files with 26 additions and 13 deletions

View File

@@ -38,13 +38,17 @@ While in theory a package can be created entirely over the web interface,
the use of the cli-tool `osc` is more convenient
and is described in the [official documentation](https://openbuildservice.org/help/manuals/obs-user-guide/art.obs.bg#sec.obsbg.obsconfig).
### How to built the dovecot debian package for all platforms
### How to build the dovecot debian package for all platforms via our script
XXX suggested: transform this paragraph by providing a script to
XXX - download precise files from https://packages.debian.org/unstable/dovecot-core
XXX - clone the chatmail/dovecot repo
XXX - running `debuild`
XXX - do `osc add PRECISE_FILE_PATTERN` or so
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/.
Use `source build-obs.sh` to run it.
### Build the debian package in the OBS manually
Alternatively you can follow these steps to do it manually:
On a Debian machine (for exampe [distrobox](https://distrobox.it/)),
clone the [chatmail dovecot fork](https://github.com/chatmail/dovecot).

View File

@@ -1,13 +1,19 @@
#!/bin/bash
# this script requires wget, osc and debuild installed.
# Define path of your local OBS repository
OBS_PATH=~/obs/home:deltachat/dovecot/
# Download Debian Source Files
echo "Downloading precise files from Debian unstable repository..."
mkdir dovecot-build
cd dovecot-build
# taken May 2nd 2024, from https://packages.debian.org/unstable/dovecot-core
wget http://deb.debian.org/debian/pool/main/d/dovecot/dovecot_2.3.21+dfsg1-3.debian.tar.xz
wget http://deb.debian.org/debian/pool/main/d/dovecot/dovecot_2.3.21+dfsg1.orig.tar.gz
# taken May 6th 2024, from https://packages.debian.org/unstable/dovecot-core
curl http://deb.debian.org/debian/pool/main/d/dovecot/dovecot_2.3.21+dfsg1-3.debian.tar.xz --output dovecot_2.3.21+dfsg1-3.debian.tar.xz
curl http://deb.debian.org/debian/pool/main/d/dovecot/dovecot_2.3.21+dfsg1.orig.tar.gz --output dovecot_2.3.21+dfsg1.orig.tar.gz
curl http://deb.debian.org/debian/pool/main/d/dovecot/dovecot_2.3.21+dfsg1.orig-pigeonhole.tar.gz --output dovecot_2.3.21+dfsg1.orig-pigeonhole.tar.gz
# Clone the Chatmail Dovecot Repo
echo "Cloning the Chatmail Dovecot fork..."
@@ -17,15 +23,18 @@ 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?
echo "Copying files to your local OBS repository..."
cp /path/to/downloaded/files/*.tar.gz /path/to/your/local/obs/repo/
cp /path/to/downloaded/files/*.dsc /path/to/your/local/obs/repo/
cp /path/to/downloaded/files/*.xz /path/to/your/local/obs/repo/
cp dovecot_2.3.21+dfsg1-3.debian.tar.xz $OBS_PATH
cp dovecot_2.3.21+dfsg1.orig.tar.gz $OBS_PATH
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/
osc add *
osc add dovecot_2.3.21+dfsg1-3.debian.tar.xz
osc add
osc add
osc commit