Giter VIP home page Giter VIP logo

fex-ppa's Introduction

Quick copy-paste guide

  • From root of tree
export TEMP_SOURCE=$(mktemp -d -t FEX-XXXXXXXXXX)
export FEX_VERSION=$(date +%y%m)
export UBUNTU_SUBVERSION= # If exists then tilde plus a number
export PACKAGE_VERSION=${FEX_VERSION}${UBUNTU_SUBVERSION}
export FEXPPA=$(readlink -f .)
git clone --recurse-submodules --depth=1 --branch=FEX-${FEX_VERSION} https://github.com/FEX-Emu/FEX.git $TEMP_SOURCE
rm -Rf $TEMP_SOURCE/External/{fex-gcc-target-tests-bins,fex-gvisor-tests-bins,fex-posixtest-bins}
rm -Rf $TEMP_SOURCE/.git
rm -Rf $TEMP_SOURCE/unittests
rm -Rf $TEMP_SOURCE/External/vixl/src/aarch32/
rm -Rf $TEMP_SOURCE/External/vixl/test
tar -cvpzf fex-emu_${PACKAGE_VERSION}.orig.tar.gz -C $TEMP_SOURCE/ .
${FEXPPA}/create_packages.py 0 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz
${FEXPPA}/create_packages.py 1 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz
${FEXPPA}/create_packages.py 2 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz
${FEXPPA}/create_packages.py 3 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz
rm -Rf $TEMP_SOURCE
rm -Rf ${FEXPPA}/gen_ppa
rm ${FEXPPA}/fex-emu_${PACKAGE_VERSION}.orig.tar.gz

Stage documentation

  • Args = <Script> <Stage> <Version> <Changelog file> <Source tar>

Stage 0

  • Generates a change log from the passed in changelog file and copies it in to debian/changelog
  • Wrapped by changelog_template
  • Make sure to check debian/changelog after generating

${FEXPPA}/create_packages.py 0 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz

Stage 1

  • Generates all the target specific folder structures for building source packages
  • Generates in to gen_ppa in cwd

${FEXPPA}/create_packages.py 1 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz

Stage 2

  • Walks all of the target specific debian trees and runs debuild -S over them cleanly

${FEXPPA}/create_packages.py 2 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz

Stage 3

  • Walks all of the created debian packages and uploads them directly to the fex-ppa with dput
  • Hardcoded to ppa:fex-emu/fex

${FEXPPA}/create_packages.py 3 ${FEX_VERSION} ${PACKAGE_VERSION} TestChanges fex-emu_${PACKAGE_VERSION}.orig.tar.gz

Local pbuilder testing

Setting up a pbuilder

Only needs to be done once

This allows you to create a pbuilder to test building the package before uploading to PPA

  • Depending on which builder you want, generate an image for whichever distro series

sudo pbuilder create --distribution focal --architecture amd64 --basetgz /var/cache/pbuilder/focal-amd64-base.tgz

sudo pbuilder create --distribution jammy --architecture amd64 --basetgz /var/cache/pbuilder/jammy-amd64-base.tgz

sudo pbuilder create --distribution kinetic --architecture amd64 --basetgz /var/cache/pbuilder/kinetic-amd64-base.tgz

sudo pbuilder create --distribution focal --architecture arm64 --mirror "http://ports.ubuntu.com/ubuntu-ports/" --basetgz /var/cache/pbuilder/focal-arm64-base.tgz

sudo pbuilder create --distribution jammy --architecture arm64 --mirror "http://ports.ubuntu.com/ubuntu-ports/" --basetgz /var/cache/pbuilder/jammy-arm64-base.tgz

sudo pbuilder create --distribution kinetic --architecture arm64 --mirror "http://ports.ubuntu.com/ubuntu-ports/" --basetgz /var/cache/pbuilder/kinetic-arm64-base.tgz

Perform the build

This will attempt building the package provided with the dsc file. Result will be in /var/cache/pbuilder/result/

sudo pbuilder build --distribution focal --architecture amd64 --basetgz /var/cache/pbuilder/focal-amd64-base.tgz ../fex-emu_$FEX_VERSION.dsc

sudo pbuilder build --distribution jammy --architecture amd64 --basetgz /var/cache/pbuilder/jammy-amd64-base.tgz ../fex-emu_$FEX_VERSION.dsc

sudo pbuilder build --distribution kinetic --architecture amd64 --basetgz /var/cache/pbuilder/kinetic-amd64-base.tgz gen_ppa/fex-emu-armv8.0_${PACKAGE_VERSION}~k.dsc

sudo pbuilder build --distribution focal --architecture arm64 --basetgz /var/cache/pbuilder/focal-arm64-base.tgz gen_ppa/fex-emu-armv8.0_${PACKAGE_VERSION}~f.dsc

sudo pbuilder build --distribution jammy --architecture arm64 --basetgz /var/cache/pbuilder/jammy-arm64-base.tgz gen_ppa/fex-emu-armv8.0_${PACKAGE_VERSION}~j.dsc

sudo pbuilder build --distribution kinetic --architecture arm64 --basetgz /var/cache/pbuilder/kinetic-arm64-base.tgz gen_ppa/fex-emu-armv8.0_${PACKAGE_VERSION}~k.dsc

Cleanup

sudo rm /var/cache/pbuilder/impish-amd64-base.tgz

After this step you will need to do the Setting up a pbuilder step again

Manual uploading to launchpad ppa

  • Typically stage three of the create_packages.py script does this dput ppa:fex-emu/fex ../fex-emu_2201_source.changes

Common errors

Unable to find fex-emu_2201ubuntu4.orig.tar.gz in upload or distribution.

  • debuild -S would have printed some text about this

    • Working: dpkg-buildpackage: info: full upload (original source is included)
    • Non-working: dpkg-buildpackage: info: binary and diff upload (original source NOT included)
  • Failure I found with this was changelog had multiple version back to back same versions

Unable to find mandatory field 'Changed-By' in the changes file.

  • Changes need to be indented by two spaces otherwise the change file is invalid.
  • Ensure it is indented

create_package failed with log complaining about running out of memory

  • Add auto-expand-secmem to $HOME/.gnupg/gpg-agent.conf and then restart gpg-agent with killall gpg-agent
  • Lets GPG agent allocate more secure working memory which is necessary to allow multiple signing agents at once

New subversion rejected due to Version older than that in the archive

When updating the package with a new subversion, the old version first needs to be deleted from the ppa.

  • This is due to their version check not really understanding the <Version>~<SubVersion>~<distro series> layout

fex-ppa's People

Contributors

sonicadvance1 avatar

Watchers

 avatar  avatar

fex-ppa's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.