[MDEV-10048] building from source on ubuntu 16.04 xenial, requires a different way to create personal repo Created: 2016-05-09  Updated: 2021-02-06  Resolved: 2021-02-06

Status: Closed
Project: MariaDB Server
Component/s: Documentation
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Shimon Doodkin Assignee: Ian Gilfillan
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

ubuntu 16 LTS xenial



 Description   

first, I had followed https://mariadb.com/kb/en/mariadb/Creating_a_Debian_Repository/
then
ubuntu 16 required me to give it a signed repository.
complained about errors of InRevision missing and was Packages Missing.

https://help.ubuntu.com/community/CreateAuthenticatedRepository // note to replace > with >
the key information was that I had to use apt-ftparchive to generate the files
and the code snippets I had to use to sign

Also ubuntu 16 has some bug with apt that is stronger with its security and can't read from /root/repo folder
I had moved the repo to /opt/ and chmod 777 https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/1543280
then strangely it looked for the deb files in repo folder, not in repo/binary. so I moved them

finally, it worked for my with the following script:

 
 
sudo su -
cd ~
 
mkdir mariadb
 
apt-get install build-essential devscripts dpkg-sig git
 
apt-get install libsnappy-dev  liblzo2-dev libbz2-dev liblzma-dev   liblz4-dev # when you have these libs it enables compression automatically
apt-get install bison chrpath cmake debhelper dh-apparmor dpatch libaio-dev libboost-dev libjudy-dev libkrb5-dev libncurses5-dev  libpam0g-dev libreadline-gplv2-dev libssl-dev po-debconf psmisc zlib1g-dev  libcrack2-dev libjemalloc-dev
 
git clone --recursive https://github.com/MariaDB/server.git
 
cd server
git checkout 10.1
./debian/autobake-deb.sh
 
mkdir repo              # optional to have a backup of non signed debs
cp ./*maria* ./repo/ # optional to have a backup of non signed debs
 
gpg --gen-key # make rsa only key with 4096 bits
gpg --list-keys  #see those numbers that come after 'pub   4096R/' in the list
gpg --output keyFile --armor --export 9D0234BB
dpkg-sig -k 'Full Name (comment) <email@email.com>' --sign builder ./*.deb #waht comes after uid in gpgp key list, not sure about this command: why i need to add some name to signing, why even after signing apt told me my debs are not trusted
cat keyFile | apt-key add -
 
# "trusty" can be replaced with "xenial" in all following lines (it is just a folder name)
 
mkdir -p dists/trusty/binary/binary-amd64/Packages
apt-ftparchive packages . > dists/trusty/binary/binary-amd64/Packages
gzip -c dists/trusty/binary/binary-amd64/Packages > dists/trusty/binary/binary-amd64/Packages.gz
apt-ftparchive release . > dists/trusty/binary/binary-amd64/Release
gpg --clearsign -o InRelease dists/trusty/binary/binary-amd64/Release
gpg -abs -o dists/trusty/binary/binary-amd64/Release.gpg dists/trusty/binary/binary-amd64/Release
 
 
add to /etc/apt/sources.list: 
 
deb [arch=amd64 trusted=yes] file:///root/mariadb/repo trusty binary



 Comments   
Comment by Otto Kekäläinen [ 2021-02-06 ]

The current contents of https://mariadb.com/kb/en/Creating_a_Debian_Repository/ is OK.

For more help on Debian repositories you should consult Debian repo experts. I am closing this now as it is not a MariaDB bug issue.

Anyway, you probably don't need to create a repository at all, you can just install directly the .deb files that are local by running `apt install ./*.deb`.

Generated at Thu Feb 08 07:39:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.