Code Monkey home page Code Monkey logo

xs-opam's Introduction

Opam Repository for the xapi components of xenserver

Build Status LCM Build Status LCM Scheduled Build Status Old LCM Scheduled Build Status

This Opam repository contains the OCaml components of the XenServer toolstack and their upstream dependencies. This is just package metadata (not the actual source code) that tells Opam how to download source code, compile, and install packages.

Using this OPAM Repository for Dev Work

You can add this Git repository as a remote Opam repository to your local Opam setup in order to install XenServer packages. See below for an alternative using Docker when you don't want to use Opam natively. Please be aware that this is not giving you a working XenServer installation because this depends on other components. It is most useful for development outside a build system for the complete XenServer distribution.

opam repo add xs-opam https://github.com/xapi-project/xs-opam.git

Installing packages

To install a package $PKG it's enough to run

opam depext $PKG
opam install $PKG

For development, it is often useful to clone the package sources and only install its dependencies, leaving the job to build the package and make changes to the developer. This can be done as follows:

opam depext $PKG
opam install --deps-only $PKG

After that, you can enter the folder containing the cloned sources and run the appropriate build command.

Layout of This Repository

Packages are organised into namespaces:

  • upstream: upstream packages for xs
  • upstream-extra: upstream packages required for xs-extra
  • xs: packages required for xs-extra
  • xs-extra: toolstack components - latest version

Continuous Integration

Github Actions builds the entire universe represented by this Opam repository.

Using xs-opam on github actions builds

To use the repository in github actions 3 steps are needed to set up the opam environment:

  • One to download the .env file
  • One to load it into the environment
  • One to initialize the opam environment

Here's an example template for the standard .github/workflows/main.yml, package should be change to include the opam packages available in the repository and the build and test steps adapted to the repository.

name: Build and test

on:
  push:
  pull_request:

jobs:
  ocaml-test:
    name: Ocaml tests
    runs-on: ubuntu-20.04
    env:
      package: "EXAMPLE-BINARY EXAMPLE-LIBRARY"

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Pull configuration from xs-opam
        run: |
          curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/master/tools/xs-opam-ci.env | cut -f2 -d " " > .env

      - name: Load environment file
        id: dotenv
        uses: falti/[email protected]

      - name: Use ocaml
        uses: avsm/setup-ocaml@v1
        with:
          ocaml-version: ${{ steps.dotenv.outputs.ocaml_version_full }}
          opam-repository: ${{ steps.dotenv.outputs.repository }}

      - name: Install dependencies
        run: |
          opam pin add . --no-action
          opam depext -u ${{ env.package }}
          opam install ${{ env.package }} --deps-only --with-test -v

      - name: Build
        run: |
          opam exec -- ./configure
          opam exec -- make

      - name: Run tests
        run: opam exec -- make test

xs-opam's People

Contributors

bernhardkaindl avatar edwintorok avatar fillzero avatar gaborigloi avatar jameshensmancitrix avatar jonludlam avatar kc284 avatar krizex avatar lindig avatar mseri avatar psafont avatar robhoes avatar stormi avatar thomassa avatar vincent-lau avatar yarsincitrix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xs-opam's Issues

Port to jbuilder

The following packages need porting to jbuilder. Please keep this list updated with the packages that you port and release.

Note: if you port packages using xapi-stdext, please modify the dependencies and use the new sub-packages instead.

From packages/xs:

  • cdrom.0.9.3
  • crc.2.0.0
  • ezxenstore.0.1.2
  • fd-send-recv.1.0.5
  • nbd.2.2.0
  • netlink.0.3.1
  • opasswd.1.0.2
  • qmp.0.10.0
  • xapi-backtrace.0.5
  • xapi-inventory.1.0.2
  • xapi-rrd.1.1.0
  • xapi-stdext.3.0.0
  • xapi-test-utils.1.1.0
  • xen-api-client.0.11.0

From packages/xs-extra:

  • message-switch.master
  • rrd2csv.master
  • rrddump.master
  • vhd-tool.master
  • vncproxy.master
  • wsproxy.master
  • xapi-forkexecd.master
  • xapi-idl.master
  • xapi-libs-transitional.master
  • xapi.master
  • xapi-nbd.master
  • xapi-netdev.master
  • xapi-networkd.master
  • xapi-plugin.master
  • xapi-rrdd.master
  • xapi-rrdd-plugin.master
  • xapi-rrd-transport.master
  • xapi-squeezed.master
  • xapi-storage-cli.master
  • xapi-storage.master
  • xapi-storage-script.master
  • xapi-tapctl.master
  • xapi-xenopsd.master
  • xapi-xenops.master
  • xen-api-sdk.master
  • xenctrl.master (repo name ocaml-xen-lowlevel-libs, broken on recent xen -- needs planning and is not really necessary atm) ๐ŸŽ

Not in xs-opam (due to issues with blktap-devel):

  • rrdd-plugins.master (on xenserver/rrdd-plugins)

๐Ÿ : simple port
๐ŸŽ : good luck with that

Move from jbuilder to dune

The following packages are still calling jbuilder for building, they need moving to dune. Please keep the list updated with the packages in progress and done.

In xs-extra:

In xs:

In xs-extra-dummy:

Automate the Travis build checks

As suggested by @gaborigloi, the new docker based Travis build allow for a greater flexibility and could be useful for a number of additional automated checks:

  • build a container with all xs-opam installed and push it to the docker repository -> done: #165
  • build a container without the upstream folder, install xs and xs-extra and check that we have only needed packages in upstream and upstream-extra -> detecting unused upstream packages done: #249 , unused upstream-extra packages still not detected
  • build a container with xs-opam as the extra remote and check which packages we can update, presenting the list as the final stage of the Travis build -> #223
  • build and push the complete documentation of all the packages we use
  • make it possible to build the container locally -> done: #170
  • Run all the tests of all the packages
  • ...

Make sure we're passing the right number of jobs to dune everywhere

As the dune manuals says here: https://dune.readthedocs.io/en/latest/usage.html#invocation-from-opam , we should pass the number of jobs from OPAM to dune, both for the build and test instructions:

build: [["dune" "build" "-p" name "-j" jobs]]
build-test: [["dune" "runtest" "-p" name "-j" jobs]]

We don't do this for all of our packages, so we should update our opam files where necessary. This will ensure that dune will use the concurrency option provided by opam, and that we can centrally control the number of jobs when building xs-opam by passing the -j parameter to OPAM - dune uses all the cores by default.

Make Docker images work with UIDs other than 1000

We've enabled automatic uploading of Docker images in #165 and documented it in #167 , but currently building using these images only works if the UID of the user is 1000.
We could try borrowing the entry point logic from planex to remove this limitation.

Port to safe strings

The following packages need porting to safe-string. Please keep this list updated with the packages that you port and release. Note that some packages could already work with safe-strings, they just need to be marked as such.

From packages/xs:

  • cdrom
  • crc
  • ezxenstore.0.2.0
  • fd-send-recv
  • nbd
  • netlink
  • opasswd
  • qmp
  • xapi-backtrace
  • xapi-inventory
  • xapi-rrd.1.3.0
  • xapi-stdext.4.0.0
  • xapi-test-utils

From packages/xs-extra:

  • message-switch.master
  • rrd2csv.master
  • rrddump.master
  • vhd-tool.master
  • vncproxy.master
  • wsproxy.master
  • xapi-forkexecd.master
  • xapi-idl.master
  • xapi-libs-transitional.master
  • xapi.master (in progress)
  • xapi-nbd.master
  • xapi-netdev.master
  • xapi-networkd.master
  • xapi-plugin.master
  • xapi-rrdd.master
  • xapi-rrdd-plugin.master
  • xapi-rrd-transport.master
  • xapi-squeezed.master
  • xapi-storage-cli.master
  • xapi-storage.master
  • xapi-storage-script.master
  • xapi-tapctl.master
  • xapi-xenopsd.master
  • xapi-xenops.master
  • xen-api-client
  • xen-api-sdk.master
  • xenctrl.master

Not in xs-opam (due to issues with blktap-devel):

  • rrdd-plugins.master (on xenserver/rrdd-plugins)

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.