Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10048

building from source on ubuntu 16.04 xenial, requires a different way to create personal repo

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • N/A
    • N/A
    • Documentation
    • None
    • 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
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            shimondoodkin Shimon Doodkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.