Giter Club home page Giter Club logo

packages's Introduction

MesaLock Linux Packages

Build Status

To ensure the safty and security of the user space environment, unlike other Linux distributions, packages in MesaLock Linux are written in memory-safe language (e.g., Rust and Go). We select packages based on three metrics: quality, functionality and security. Please read the MesaLock Linux documentation to learn more.

Categories

There are four categories of all packages:

  • core: core packages to bootstrap the system
  • community: packages from community
  • core-testing: new core packages or new version for trying and testing
  • community-testing: new community packages or new version for trying and testing

Basically, core packages are essential packages to bootstrap the system and have the basic function. community packages are other nice-to-have packages written in Rust/Go. And core-testing and community-testing will aggressively use latest version or newer version code for testing.

Contributing new packages

A package consists of a build.yml script and related files and patches. It is very simple to include a new package in MesaLock Linux. The build.yml is a YAML file and should contain two parts: metadata and building functions.

The build tool (mkpkg) will make a package in following steps:

  1. downloading source code and/or extract it into $builddir directory
  2. build: building sources
  3. check: testing and checking functions
  4. install: zip the output as a package

There are several pre-defined variables which mkpkg will look for:

  • name, version, description, url, skip_check and license: package related metadata
  • build, check, install: script to build/check/install the package

Here are several pre-defined environment variables you can use in the script

  • name, version: package metadata information
  • builddir: directory for building package
  • pkgdir: directory to install compiled code

You can find more details in the mkpkg project: https://github.com/mesalock-linux/mkpkg

Example

Here is an example of build.yml script for ripgrep, a Rust grep tool.

package:
  name: ripgrep
  version: 0.8.0
  description: ripgrep combines the usability of The Silver Searcher with the raw speed of grep
  license: [MIT, Unlicense]
  url: https://github.com/BurntSushi/ripgrep
  skip_check: true

  source:
    - git+https://github.com/BurntSushi/$name.git

  prepare:
    - cd "$name".git && git checkout -B 0.8.0

  build:
    - cd "$name".git && cargo build --release
    - cd "$name".git && cargo test

  install:
    - cd "$name".git && install -D -m744 target/release/rg -t "$pkgdir"/bin/

Maintainer

License

The MesaLock Linux Packages project is provided under the BSD license.

packages's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

xyproto hi-t0day

packages's Issues

Switch to YAML

We should switch from PKGBUILD-like shell scripts to a custom YAML format like so (this is for glibc):

env:
  name: glibc
  ver: 2.26
  patch: 0

package:
  name: $name
  version: $ver.$patch
  description: Glibc
  license:
    - GPL
    - LGPL

  source:
    - http://ftp.gnu.org/gnu/$name/$name-$ver.tar.gz

  build:
    - |
      echo "slibdir=/usr/lib" >> configparms
      echo "rtlddir=/usr/lib" >> configparms
      echo "sbindir=/usr/bin" >> configparms
      echo "rootsbindir=/usr/bin" >> configparms
    - $name-$ver/configure
          --prefix=/usr
          --libdir=/usr/lib
          --libexecdir=/usr/lib
          --enable-add-ons
          --enable-bind-now
          --disable-profile
          --enable-stackguard-randomization
          --enable-stack-protector=strong
          --enable-lock-elision
          --enable-multi-arch
          --disable-werror

      # build libraries with fortify disabled
    - echo "build-programs=no" >> configparms
    - make

      # re-enable fortify for programs
    - sed -i "/build-programs=/s#no#yes#" configparms

    - |
      echo "CC += -D_FORTIFY_SOURCE=2" >> configparms
      echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
    - make

  install:
      # mkdir -p install-root
      # make install_root=$(pwd)/install-root install
    - make install_root="$pkgdir" install
    - strip --strip-unneeded "$pkgdir"/usr/lib/{libdl.so.2,libm.so.6,librt.so.1}

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.