Uploading Package to PPA

You are viewing an old version of this article. View the current version here.

Create a Launchpad account. ### Docker build, cloning the MariaDB repository and mapping it to the docker container ####

1. mkdir mariadb-source 2. cd mariadb-source 3. vi Dockerfile 4. Copy the following contents to Dockerfile: ###########

  1. MariaDB 10.3 Ubuntu 17.10 build environment
  2. Published as mariadb-10-3-ubuntu-17.10-build-env FROM ubuntu:17.10 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ apt-get install -y --no-install-recommends \ systemd \ devscripts \ build-essential \ lsb-release \ equivs \ git \ curl \ git-buildpackage \ nano \ vim \ pristine-tar

RUN curl -skO https://raw.githubusercontent.com/ottok/mariadb-10.1/ubuntu-17.10/debian/control

ENV GIT_SSL_NO_VERIFY true

RUN mk-build-deps -t 'apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends' -i control

ENV container docker ENV DEBIAN_FRONTEND noninteractive ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8

##########

5. Run docker build . -t ubuntu-17.10-packaging

* Do git clone of the latest repository:

6. cd && mkdir debian-packaging && cd debian-packaging && git clone https://salsa.debian.org/mariadb-team/mariadb-10.1.git

## Generate, publish and upload PGP key ####

6. Generate OpenPGP key with the following command: $ gpg --gen-key select (1) RSA and RSA Keysize: accept 2048 Valid for: accept 0 Type name, email and comment (comment is optional) Type 0 Type passphrase (twice) Follow instructions to help generate a random key Keep the Key ID and fingerprint text, they are needed in the next step Set generated key as default in /.bashrc $ sudo nano /.bashrc [.. add this ..] export GPGKEY=<key_id> Restart GPG-agent and source ./bashrc, or restart session

7. Publish the key to the key server: gpg --keyserver keyserver.ubuntu.com --send-keys 12345678 and substitute 12345678 with your key's id

** If this gives timeout error, keep re-trying after a while *

8. Upload the key's fingerprint here: Upload https://help.launchpad.net/YourAccount/ImportingYourPGPKey fingerprint here https://launchpad.net/~rsurve/+editpgpkeys

9. gpg --export [your-key-id] > /debian-packaging/pub.key 10. gpg --export-secret-key [your-key-id] > /debian-packaging/secret.key

gpg -k ^Should show the key

10. How to upload: https://github.com/exelearning/iteexe/wiki/How-to-upload-to-Launchpad-PPA-repository-(.deb-packages)

#######

11. Open /etc/devscripts.conf And look for this line: DEBSIGN_MAINT Uncomment it and add your name there

export DEBEMAIL=[your-email-id]

### From inside the conatainer ###

13. docker run -v /debian-packaging/:/repo -it ubuntu-17.10-packaging bash

14. apt-get install devscripts 15. gpg --import pub.key 16. gpg --import secret.key 17. gpg -k

18. cd /repo/mariadb-10.1 && git fetch && git checkout pristine-tar && git checkout ubuntu-17.10

19. git clean -dffx && git reset --hard HEAD

20. export DEB_BUILD_OPTIONS="parallel=10 nocheck" or export DEB_BUILD_OPTIONS="parallel=5 nocheck"

21. Go to /repo folder (Inside docker) and delete all the files except mariadb-10.1 folder: rm *

22. gbp buildpackage

##### For re-running the set up container ##### 23. run docker commit <container-id> This will generate an ID

For restarting the same container again use this ID: docker run -v /debian-packaging/:/repo -it <ID> bash

##### Last command for uploading package to PPA: 24. backportpackage -u <your-ppa-address> -d <ubuntu-version-to-backport-to> -S <a-version-suffix-name-for-this-package> <the-most-recent-dsc-file> Example: backportpackage -u ppa:cvicentiu/mariadb-10.0-dev2 -d bionic -S testtry mariadb-10.1_10.1.30-0ubuntu0.17.10.1.dsc Run this command in the /repo folder, where the .dsc file is located It should ask for the gpg key password again

## Docker tutorial available here ### https://docs.google.com/presentation/d/1euJrK7MJ9QRvwW33iwESIEo5Dyi7JWExIKFrISktFao/edit#slide=id.p4

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.