├── core ├── filesystem │ ├── motd │ ├── group │ ├── gshadow │ ├── shadow │ ├── issue │ ├── passwd │ ├── hosts │ ├── resolv.conf │ ├── shells │ ├── host.conf │ ├── fstab │ ├── os-release │ ├── nsswitch.conf │ └── build.yml ├── syslinux │ ├── syslinux.cfg │ └── build.yml ├── init │ ├── build.yml │ └── init ├── giproute2 │ └── build.yml ├── mgetty │ └── build.yml ├── minit │ └── build.yml ├── uutils-findutils │ └── build.yml ├── ripgrep │ └── build.yml ├── uutils-coreutils │ └── build.yml ├── ion-shell │ └── build.yml ├── linux │ └── build.yml ├── tzdata │ └── build.yml ├── glibc │ └── build.yml └── gcc-libs │ └── build.yml ├── .drone.yml ├── community ├── exa │ └── build.yml ├── tokei │ └── build.yml ├── brotli │ └── build.yml ├── fd-find │ └── build.yml ├── xi-term │ └── build.yml ├── xi-core │ └── build.yml └── mesalock-demo │ └── build.yml ├── core-testing ├── busybox │ └── build.yml ├── mesapy │ └── build.yml └── pypy │ └── build.yml ├── community-testing └── swindon │ └── build.yml ├── LICENSE ├── .drone └── build-pkgs └── README.md /core/filesystem/motd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/filesystem/group: -------------------------------------------------------------------------------- 1 | root:x:0:root 2 | -------------------------------------------------------------------------------- /core/filesystem/gshadow: -------------------------------------------------------------------------------- 1 | root:::root 2 | -------------------------------------------------------------------------------- /core/filesystem/shadow: -------------------------------------------------------------------------------- 1 | root::14871:::::: 2 | -------------------------------------------------------------------------------- /core/filesystem/issue: -------------------------------------------------------------------------------- 1 | MesaLock Linux \r (\l) 2 | 3 | -------------------------------------------------------------------------------- /core/filesystem/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0::/root:/bin/ion 2 | -------------------------------------------------------------------------------- /core/filesystem/hosts: -------------------------------------------------------------------------------- 1 | # Static table lookup for hostnames. 2 | # See hosts(5) for details. 3 | -------------------------------------------------------------------------------- /core/filesystem/resolv.conf: -------------------------------------------------------------------------------- 1 | # Resolver configuration file. 2 | # See resolv.conf(5) for details. 3 | -------------------------------------------------------------------------------- /core/filesystem/shells: -------------------------------------------------------------------------------- 1 | # Pathnames of valid login shells. 2 | # See shells(5) for details. 3 | 4 | /bin/ion 5 | -------------------------------------------------------------------------------- /core/filesystem/host.conf: -------------------------------------------------------------------------------- 1 | # Resolver configuration file. 2 | # See host.conf(5) for details. 3 | 4 | multi on 5 | -------------------------------------------------------------------------------- /core/filesystem/fstab: -------------------------------------------------------------------------------- 1 | # Static information about the filesystems. 2 | # See fstab(5) for details. 3 | 4 | # 5 | -------------------------------------------------------------------------------- /core/filesystem/os-release: -------------------------------------------------------------------------------- 1 | NAME="Mesalock Linux" 2 | PRETTY_NAME="Mesalock Linux" 3 | ID=mesalock 4 | ID_LIKE=mesalocklinux 5 | ANSI_COLOR="0;36" 6 | HOME_URL="" 7 | SUPPORT_URL="" 8 | BUG_REPORT_URL="" 9 | -------------------------------------------------------------------------------- /core/syslinux/syslinux.cfg: -------------------------------------------------------------------------------- 1 | TIMEOUT 20 2 | PROMPT 1 3 | DEFAULT mesalock 4 | 5 | LABEL mesalock 6 | MENU LABEL Mesalock Linux 7 | KERNEL /boot/vmlinuz 8 | INITRD /boot/initramfs 9 | append modules=loop,squashfs,sd-mod,usb-storage quiet 10 | -------------------------------------------------------------------------------- /core/init/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: init 3 | version: 0.1.0 4 | description: init script 5 | license: [BSD] 6 | skip_check: true 7 | 8 | source: 9 | - init 10 | 11 | install: 12 | - install -D -m744 init "$pkgdir"/init 13 | -------------------------------------------------------------------------------- /.drone.yml: -------------------------------------------------------------------------------- 1 | kind: pipeline 2 | name: default 3 | 4 | steps: 5 | - name: prepare 6 | image: plugins/git 7 | commands: 8 | - git clone https://github.com/mesalock-linux/mkpkg.git 9 | 10 | - name: build-packages 11 | image: mesalocklinux/build-mesalock-linux 12 | pull: always 13 | commands: 14 | - ./.drone/build-pkgs 15 | -------------------------------------------------------------------------------- /core/filesystem/nsswitch.conf: -------------------------------------------------------------------------------- 1 | # Name Service Switch configuration file. 2 | # See nsswitch.conf(5) for details. 3 | 4 | passwd: files mymachines systemd 5 | group: files mymachines systemd 6 | shadow: files 7 | 8 | publickey: files 9 | 10 | hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname 11 | networks: files 12 | 13 | protocols: files 14 | services: files 15 | ethers: files 16 | rpc: files 17 | 18 | netgroup: files 19 | -------------------------------------------------------------------------------- /core/init/init: -------------------------------------------------------------------------------- 1 | #!/bin/busybox sh 2 | 3 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 4 | 5 | /bin/busybox mount -t proc proc /proc 6 | /bin/busybox mount -t sysfs sysfs /sys 7 | /bin/busybox mount -t devtmpfs devtmpfs /dev 8 | # mount -t devpts devpts /dev/pts 9 | # mount -t tmpfs tmpfs /dev/shm 10 | # 11 | mknod /dev/console c 5 1 12 | mknod /dev/null c 1 3 13 | mknod /dev/zero c 1 5 14 | mknod /dev/urandom c 1 9 15 | 16 | /bin/mgetty & 17 | wait 18 | -------------------------------------------------------------------------------- /community/exa/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: exa 3 | version: 0.8.0 4 | description: "Replacement for 'ls' written in Rust" 5 | skip_check: true 6 | license: [MIT] 7 | url: "https://the.exa.website/" 8 | 9 | source: 10 | - git+https://github.com/ogham/exa.git 11 | 12 | prepare: 13 | - cd "$name".git && git checkout -B v0.8.0 14 | 15 | install: 16 | - cd "$name".git && cargo install --root "$pkgdir" && rm -f "$pkgdir"/.crates.toml 17 | -------------------------------------------------------------------------------- /core/giproute2/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: giproute2 3 | version: 0.1.0 4 | description: iproute2 written in Golang 5 | license: [BSD] 6 | skip_check: true 7 | 8 | source: 9 | - git+https://github.com/mesalock-linux/giproute2.git 10 | 11 | prepare: 12 | - cd giproute2.git && git checkout -B 2e6eb9e88d50617db5c5540c7e6a623144d4698a 13 | 14 | build: 15 | - cd giproute2.git && make 16 | 17 | install: 18 | - install -D giproute2.git/ip -t "$pkgdir"/bin/ 19 | -------------------------------------------------------------------------------- /core-testing/busybox/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: busybox 3 | version: 1.27.2 4 | description: "BusyBox: The Swiss Army Knife of Embedded Linux. Mesalock Linux uses BusyBox for testing only" 5 | skip_check: true 6 | license: [GPL2] 7 | 8 | source: 9 | - http://busybox.net/downloads/$name-$version.tar.bz2 10 | 11 | build: 12 | - make -C "$builddir/${name}-${version}" O=$builddir ARCH="x86_64" defconfig 13 | - make 14 | 15 | install: 16 | - install -D -m755 busybox "$pkgdir"/bin/busybox 17 | -------------------------------------------------------------------------------- /core/mgetty/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: mgetty 3 | version: 0.1.0 4 | description: getty written in Rust 5 | license: [BSD] 6 | skip_check: true 7 | 8 | source: 9 | - git+https://github.com/mesalock-linux/$name.git 10 | 11 | prepare: 12 | - cd "$name".git && git checkout -B fd191a6a3d0cab40cf1342bdf9766a08147bfb33 13 | 14 | build: 15 | - cd "$name".git && cargo build --release 16 | 17 | install: 18 | - cd "$name".git && install -D -m744 target/release/"$name" "$pkgdir"/bin/"$name" 19 | -------------------------------------------------------------------------------- /core/minit/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: minit 3 | version: 0.1.0 4 | description: init tool written in Rust 5 | license: [BSD] 6 | skip_check: true 7 | 8 | source: 9 | - git+https://github.com/mesalock-linux/$name.git 10 | 11 | prepare: 12 | - cd "$name".git && git checkout -B 685ada71ce42469cc6e5995e7faef475062b493c 13 | 14 | build: 15 | - cd "$name".git && cargo build --release 16 | 17 | install: 18 | - cd "$name".git && install -D -m744 target/release/"$name" "$pkgdir"/bin/"$name" 19 | -------------------------------------------------------------------------------- /community/tokei/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: tokei 3 | version: 7.0.1 4 | description: "A program that allows you to count your code, quickly" 5 | license: [MIT, Apache-2.0] 6 | url: "https://github.com/Aaronepower/tokei" 7 | 8 | source: 9 | - git+https://github.com/Aaronepower/tokei.git 10 | 11 | prepare: 12 | - cd "$name".git && git checkout -B v7.0.1 13 | 14 | check: 15 | - cd "$name".git && cargo test 16 | 17 | install: 18 | - cd "$name".git && cargo install --root "$pkgdir" && rm -f "$pkgdir"/.crates.toml -------------------------------------------------------------------------------- /community-testing/swindon/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: swindon 3 | version: 0.1.0 4 | description: "Replacement for 'ls' written in Rust" 5 | license: [MIT] 6 | url: "https://the.exa.website/" 7 | 8 | source: 9 | - git+https://github.com/swindon-rs/swindon.git 10 | 11 | prepare: 12 | - cd "$name".git && git checkout -B 112d325144ea437be6e5ef38019fffce794ae788 13 | 14 | check: 15 | - cd "$name".git && cargo test 16 | 17 | install: 18 | - cd "$name".git && cargo install --root "$pkgdir" && rm -f "$pkgdir"/.crates.toml 19 | -------------------------------------------------------------------------------- /community/brotli/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: brotli 3 | version: 0.1.0 4 | description: Brotli compression format 5 | license: [BSD] 6 | url: https://github.com/dropbox/rust-brotli.git 7 | 8 | source: 9 | - git+https://github.com/dropbox/rust-brotli.git 10 | 11 | prepare: 12 | - cd rust-brotli.git && git checkout -B 2e6a268fa5682fc9ee07f8f8b9634051f6c0ef6f 13 | 14 | check: 15 | - cd rust-brotli.git && cargo test 16 | 17 | install: 18 | - cd rust-brotli.git && cargo install --root "$pkgdir" && rm -f "$pkgdir"/.crates.toml 19 | -------------------------------------------------------------------------------- /community/fd-find/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: fd-find 3 | version: 6.2.0 4 | description: "A simple, fast and user-friendly alternative to find" 5 | license: [MIT, Apache-2.0] 6 | url: "https://github.com/sharkdp/fd" 7 | 8 | source: 9 | - git+https://github.com/sharkdp/fd.git 10 | 11 | prepare: 12 | - cd fd.git && git checkout -B v6.2.0 13 | 14 | check: 15 | - cd fd.git && cargo +nightly-2018-10-24 test 16 | 17 | install: 18 | - cd fd.git && cargo +nightly-2018-10-24 install --root "$pkgdir" && rm -f "$pkgdir"/.crates.toml 19 | -------------------------------------------------------------------------------- /core/uutils-findutils/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: uutils-findutils 3 | version: 0.1.0 4 | description: Rust implementation of findutils 5 | license: [MIT] 6 | url: https://github.com/uutils/findutils 7 | 8 | source: 9 | - git+https://github.com/uutils/findutils.git 10 | 11 | prepare: 12 | - cd findutils.git && git checkout -B 2e6a268fa5682fc9ee07f8f8b9634051f6c0ef6f 13 | 14 | check: 15 | - cd findutils.git && cargo test 16 | 17 | install: 18 | - cd findutils.git && cargo install --root "$pkgdir" && rm -f "$pkgdir"/.crates.toml 19 | -------------------------------------------------------------------------------- /community/xi-term/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: xi-term 3 | version: 0.1.0 4 | description: "A terminal frontend for Xi" 5 | license: [MIT] 6 | url: "https://github.com/xi-frontend/xi-term" 7 | 8 | source: 9 | - git+https://github.com/xi-frontend/xi-term.git 10 | 11 | prepare: 12 | - cd xi-term.git && git checkout -B 0d43e263b21dc88c5826264672dc5543366fbceb 13 | 14 | check: 15 | - cd xi-term.git && cargo test 16 | 17 | build: 18 | - cd xi-term.git && cargo build --release 19 | 20 | install: 21 | - install -D "$name".git/target/release/xi-term -t "$pkgdir"/bin/ -------------------------------------------------------------------------------- /core/ripgrep/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: ripgrep 3 | version: 0.8.0 4 | description: ripgrep combines the usability of The Silver Searcher with the raw speed of grep 5 | license: [MIT, Unlicense] 6 | url: https://github.com/BurntSushi/ripgrep 7 | skip_check: true 8 | 9 | source: 10 | - git+https://github.com/BurntSushi/$name.git 11 | 12 | prepare: 13 | - cd "$name".git && git checkout -B 0.8.0 14 | 15 | build: 16 | - cd "$name".git && cargo build --release 17 | - cd "$name".git && cargo test 18 | 19 | install: 20 | - cd "$name".git && install -D -m744 target/release/rg -t "$pkgdir"/bin/ 21 | -------------------------------------------------------------------------------- /core/uutils-coreutils/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: uutils-coreutils 3 | version: 0.1.0 4 | description: Cross-platform Rust rewrite of the GNU coreutils 5 | license: [MIT] 6 | url: https://github.com/uutils/coreutils 7 | skip_check: true 8 | 9 | source: 10 | - git+https://github.com/uutils/coreutils.git 11 | 12 | prepare: 13 | - cd coreutils.git && git checkout -B 13e57616b41fc3d5fd789bcc95dc46a239473979 14 | 15 | build: 16 | # skip hashsum and expr because it depends on rust-crypto (with C library) 17 | - cd coreutils.git && make MULTICALL=y SKIP_UTILS='hashsum expr' PREFIX="$pkgdir" install 18 | -------------------------------------------------------------------------------- /core/ion-shell/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: ion-shell 3 | version: 1.0.5 4 | description: ion shell, a shell written in Rust 5 | license: [MIT] 6 | url: https://github.com/redox-os/ion 7 | skip_check: true 8 | 9 | source: 10 | - git+https://github.com/redox-os/ion.git 11 | 12 | prepare: 13 | - cd ion.git && git checkout -B 1.0.5 14 | 15 | build: 16 | - | 17 | cd ion.git 18 | cargo update -p liner # make sure liner is updated regardless of Cargo.lock 19 | cargo +nightly-2018-10-24 install --root "$pkgdir" && rm -f "$pkgdir"/.crates.toml 20 | 21 | install: 22 | - ln -s ion "$pkgdir"/bin/sh 23 | -------------------------------------------------------------------------------- /core/linux/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: linux 3 | version: 4.9.58 4 | description: Linux kernel 5 | license: [GPL2] 6 | skip_check: true 7 | 8 | source: 9 | - https://cdn.kernel.org/pub/$name/kernel/v4.x/$name-$version.tar.xz 10 | - config 11 | 12 | prepare: 13 | - mkdir -p "${builddir}"/build 14 | - cp config "${builddir}"/build/.config 15 | - make -C "${builddir}/${name}-${version}" O="${builddir}/build" ARCH="x86_64" silentoldconfig 16 | 17 | build: 18 | - cd build && make ARCH=x86_64 CC=gcc KBUILD_BUILD_VERSION="${version}-Mesalock" bzImage 19 | 20 | install: 21 | - install -Dm644 build/arch/x86_64/boot/bzImage "$pkgdir"/boot/vmlinuz 22 | -------------------------------------------------------------------------------- /community/xi-core/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: xi-core 3 | version: 0.1.0 4 | description: "A modern editor with a backend written in Rust" 5 | license: [Apache-2.0] 6 | url: "https://github.com/google/xi-editor" 7 | 8 | source: 9 | - git+https://github.com/google/xi-editor.git 10 | 11 | prepare: 12 | - cd xi-editor.git && git checkout -B 176c4002d873393b408fafc17fcbed0fc46b5057 13 | 14 | check: 15 | - cd xi-editor.git/rust && cargo +nightly-2018-10-24 test 16 | 17 | build: 18 | - cd xi-editor.git/rust && cargo +nightly-2018-10-24 build --release 19 | 20 | install: 21 | - install -D xi-editor.git/rust/target/release/xi-core -t "$pkgdir"/bin/ 22 | 23 | -------------------------------------------------------------------------------- /community/mesalock-demo/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: mesalock-demo 3 | version: 0.1.0 4 | description: "Several demos of Mesalock Linux" 5 | license: [BSD] 6 | 7 | source: 8 | - git+https://github.com/AtheMathmo/rusty-machine.git 9 | 10 | prepare: 11 | - cd rusty-machine.git && git checkout -B v0.5.4 12 | 13 | check: 14 | - cd rusty-machine.git && cargo test 15 | 16 | build: 17 | - cd rusty-machine.git && cargo build --examples --release 18 | 19 | install: 20 | - | 21 | for f in k-means_generating_cluster naive_bayes_dogs nnet-and_gate svm-sign_learner; do 22 | install -D -m755 rusty-machine.git/target/release/examples/$f -t "$pkgdir"/root/mesalock-demo/rusty-machine/ 23 | done -------------------------------------------------------------------------------- /core/syslinux/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: syslinux 3 | version: 6.4.0-pre1 4 | description: Syslinux bootloader 5 | license: [GPL] 6 | skip_check: true 7 | 8 | source: 9 | - https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.xz 10 | - syslinux.cfg 11 | 12 | build: 13 | - mkdir install_root 14 | - cd syslinux-6.04-pre1 && make installer && MAKEFLAGS=-j1 make INSTALLROOT=$builddir/install_root bios efi64 install 15 | 16 | install: 17 | - | 18 | for f in isolinux.bin ldlinux.c32 libcom32.c32 libutil.c32 mboot.c32; do 19 | install -D -m0644 install_root/usr/share/syslinux/"$f" "$pkgdir"/boot/syslinux/"$f" 20 | done 21 | - install -D -m0644 syslinux.cfg "$pkgdir"/boot/syslinux/syslinux.cfg 22 | -------------------------------------------------------------------------------- /core/tzdata/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: tzdata 3 | version: 1.0.0-2017b 4 | description: Timezone data 5 | license: [Unlicense] 6 | skip_check: true 7 | 8 | source: 9 | - https://www.iana.org/time-zones/repository/releases/tzdata2017b.tar.gz 10 | 11 | install: 12 | - | 13 | timezones="africa antarctica asia australasia \ 14 | europe northamerica southamerica \ 15 | pacificnew etcetera backward \ 16 | systemv factory" 17 | zic -y ./yearistype -d "${pkgdir}"/usr/share/zoneinfo ${timezones} 18 | zic -y ./yearistype -d "${pkgdir}"/usr/share/zoneinfo/posix ${timezones} 19 | zic -y ./yearistype -d "${pkgdir}"/usr/share/zoneinfo/right -L leapseconds ${timezones} 20 | 21 | zic -y ./yearistype -d "${pkgdir}"/usr/share/zoneinfo -p America/New_York 22 | install -m444 -t "${pkgdir}"/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab # zone.tab is depricated and will go soon 23 | -------------------------------------------------------------------------------- /core/glibc/build.yml: -------------------------------------------------------------------------------- 1 | env: 2 | pkgver: 2.26 3 | pkgpatch: 0 4 | 5 | package: 6 | name: glibc 7 | version: $pkgver.$pkgpatch 8 | description: Glibc 9 | skip_check: true 10 | license: 11 | - GPL 12 | - LGPL 13 | 14 | source: 15 | - http://ftp.gnu.org/gnu/$name/$name-$pkgver.tar.xz 16 | 17 | build: 18 | - | 19 | echo "slibdir=/usr/lib" >> configparms 20 | echo "rtlddir=/usr/lib" >> configparms 21 | echo "sbindir=/usr/bin" >> configparms 22 | echo "rootsbindir=/usr/bin" >> configparms 23 | - $name-$pkgver/configure 24 | --prefix=/usr 25 | --libdir=/usr/lib 26 | --libexecdir=/usr/lib 27 | --enable-add-ons 28 | --enable-bind-now 29 | --disable-profile 30 | --enable-stackguard-randomization 31 | --enable-stack-protector=strong 32 | --enable-lock-elision 33 | --enable-multi-arch 34 | --disable-werror 35 | 36 | # build libraries with fortify disabled 37 | - echo "build-programs=no" >> configparms 38 | - make 39 | 40 | # re-enable fortify for programs 41 | - sed -i "/build-programs=/s#no#yes#" configparms 42 | 43 | - | 44 | echo "CC += -D_FORTIFY_SOURCE=2" >> configparms 45 | echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms 46 | - make 47 | 48 | install: 49 | - make install_root="$pkgdir" install 50 | - | 51 | for f in libdl.so.2 libm.so.6 librt.so.1; do 52 | strip --strip-unneeded "$pkgdir"/usr/lib/"$f" 53 | done 54 | -------------------------------------------------------------------------------- /core/gcc-libs/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: gcc-libs 3 | version: 7.2.0 4 | description: GLibc library, only libgcc_s.so is used 5 | license: [GPL, LGPL] 6 | skip_extract: true 7 | skip_check: true 8 | 9 | source: 10 | - https://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.xz 11 | 12 | prepare: 13 | - tar -Jxf gcc-"$version".tar.xz -C "$builddir" 14 | 15 | build: 16 | - gcc-"$version"/configure --prefix=/usr 17 | --libdir=/usr/lib 18 | --libexecdir=/usr/lib 19 | --mandir=/usr/share/man 20 | --infodir=/usr/share/info 21 | --with-bugurl=https:// 22 | --enable-languages=c,c++ 23 | --enable-shared 24 | --enable-threads=posix 25 | --enable-libmpx 26 | --with-system-zlib 27 | --with-isl 28 | --enable-__cxa_atexit 29 | --disable-libunwind-exceptions 30 | --enable-clocale=gnu 31 | --disable-libstdcxx-pch 32 | --disable-libssp 33 | --enable-gnu-unique-object 34 | --enable-linker-build-id 35 | --enable-lto 36 | --enable-plugin 37 | --enable-install-libiberty 38 | --with-linker-hash-style=gnu 39 | --enable-gnu-indirect-function 40 | --disable-multilib 41 | --disable-werror 42 | --enable-checking=release 43 | --enable-default-pie 44 | --enable-default-ssp 45 | --target=x86_64-linux-gnu 46 | - make 47 | 48 | install: 49 | - make -C "$builddir"/x86_64-linux-gnu/libgcc DESTDIR="$pkgdir" install-shared 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2017, The MesaLock Linux Project Contributors 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /core-testing/mesapy/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: mesapy 3 | version: 0.1.0 4 | description: "A memory-safe Python implementation based on PyPy" 5 | skip_check: true 6 | license: [BSD] 7 | 8 | source: 9 | - git+https://github.com/mesalock-linux/mesapy.git 10 | 11 | build: 12 | - | 13 | cd mesapy.git 14 | git submodule update --init 15 | make 16 | 17 | install: 18 | - | 19 | cd mesapy.git 20 | 21 | # Prepare installation (do not package excluded C modules/libraries) 22 | pypy/tool/release/package.py \ 23 | --archive-name mesapy \ 24 | --targetdir . \ 25 | --without-cffi \ 26 | --rename_pypy_c mesapy 27 | mkdir unpacked 28 | tar xf mesapy.tar.bz2 -C unpacked 29 | 30 | # Install pypy 31 | cd unpacked 32 | install -Dm755 mesapy/bin/mesapy "${pkgdir}"/opt/mesapy/bin/mesapy 33 | install -Dm755 mesapy/bin/libpypy-c.so "${pkgdir}"/opt/mesapy/bin/libpypy-c.so 34 | install -Dm755 mesapy/bin/libminiz_oxide_c_api.so \ 35 | "${pkgdir}"/opt/mesapy/bin/libminiz_oxide_c_api.so 36 | cp -r mesapy/include mesapy/lib_pypy mesapy/lib-python mesapy/site-packages "${pkgdir}"/opt/mesapy/ 37 | cd .. 38 | 39 | # Install symlink 40 | mkdir -p "${pkgdir}"/usr/bin "${pkgdir}"/usr/lib 41 | ln -s /opt/mesapy/bin/mesapy "${pkgdir}"/usr/bin/mesapy 42 | ln -s /opt/mesapy/bin/libminiz_oxide_c_api.so "${pkgdir}"/usr/lib/libminiz_oxide_c_api.so 43 | 44 | # Install misc stuff 45 | install -Dm644 README.md "${pkgdir}"/opt/mesapy/README.md 46 | install -Dm644 LICENSE "${pkgdir}"/opt/mesapy/LICENSE 47 | install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/mesapy/LICENSE 48 | -------------------------------------------------------------------------------- /core/filesystem/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: filesystem 3 | version: 0.1.0 4 | description: Mesalock Linux base filesystem layout 5 | license: [BSD] 6 | skip_check: true 7 | 8 | source: 9 | - build.yml 10 | - fstab 11 | - group 12 | - gshadow 13 | - host.conf 14 | - hosts 15 | - issue 16 | - motd 17 | - nsswitch.conf 18 | - os-release 19 | - passwd 20 | - resolv.conf 21 | - shadow 22 | - shells 23 | 24 | install: 25 | - | 26 | cd "$pkgdir" 27 | 28 | # setup root filesystem 29 | for d in boot dev etc home mnt usr var; do 30 | install -d -m755 $d 31 | done 32 | install -d -m555 proc 33 | install -d -m555 sys 34 | install -d -m0750 root 35 | install -d -m1777 tmp 36 | 37 | # setup /etc 38 | for f in fstab group host.conf hosts issue motd nsswitch.conf \ 39 | passwd resolv.conf shells; do 40 | install -m644 "$srcdir"/$f etc/ 41 | done 42 | ln -s ../proc/self/mounts etc/mtab 43 | for f in gshadow shadow; do 44 | install -m600 "$srcdir"/$f etc/ 45 | done 46 | install -Dm644 "$srcdir"/os-release usr/lib/os-release 47 | 48 | # setup /var 49 | for d in cache local opt log/old lib/misc empty; do 50 | install -d -m755 var/$d 51 | done 52 | for d in tmp spool/mail; do 53 | install -d -m1777 var/$d 54 | done 55 | 56 | # setup /usr hierarchy 57 | for d in bin include lib share/misc src; do 58 | install -d -m755 usr/$d 59 | done 60 | 61 | # add lib symlinks 62 | ln -s usr/lib lib 63 | ln -s usr/lib lib64 64 | ln -s lib usr/lib64 65 | 66 | # add bin symlinks 67 | ln -s usr/bin bin 68 | ln -s usr/bin sbin 69 | ln -s bin usr/sbin 70 | 71 | # setup /usr/local hierarchy 72 | for d in bin etc games include lib man sbin share src; do 73 | install -d -m755 usr/local/$d 74 | done 75 | -------------------------------------------------------------------------------- /.drone/build-pkgs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | MESALOCK_PACKAGES_DIR="$(pwd)" 6 | MESALOCK_MKPKG_DIR="$(pwd)"/mkpkg 7 | 8 | changed_pkgs() { 9 | local repo="$1" 10 | local commit_ish="$2" 11 | 12 | # Get names of repo's subdirectories with modified APKBUILD, 13 | # but ignore deleted ones. 14 | local pkgs="$(git diff-tree -r --relative="$repo" --name-only --diff-filter=ACMR \ 15 | "$commit_ish" -- '*build.yml' | xargs)" 16 | echo "$pkgs" 17 | } 18 | 19 | die() { 20 | print -s1 -c1 "$@\n" 1>&2 21 | exit 1 22 | } 23 | 24 | print() { 25 | local style=0 26 | local fcolor=9 27 | 28 | local opt; while getopts 's:c:' opt; do 29 | case "$opt" in 30 | s) style="$OPTARG";; 31 | c) fcolor="$OPTARG";; 32 | esac 33 | done 34 | 35 | shift $(( OPTIND - 1 )) 36 | local text="$@" 37 | 38 | printf "\033[${style};3${fcolor}m$text\033[0m" 39 | } 40 | 41 | failed_pkgs='' 42 | successful_pkgs='' 43 | 44 | cd "$MESALOCK_PACKAGES_DIR" 45 | DRONE_COMMIT_RANGE="${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT}" 46 | commit_range="$(echo "${DRONE_COMMIT_RANGE:-}" | sed -E 's/\.{3}/../')" 47 | if ! git rev-parse "$commit_range" >/dev/null 2>&1; then 48 | commit_range="$(git rev-parse HEAD^1)..HEAD" 49 | fi 50 | 51 | git --no-pager diff --color --stat "$commit_range" 52 | ret=$(changed_pkgs "$MESALOCK_LINUX_PACKAGES" "$commit_range") 53 | if [ "$ret" != "" ]; then 54 | cd "$MESALOCK_MKPKG_DIR" && cargo build --release 55 | fi 56 | 57 | cd "$MESALOCK_PACKAGES_DIR" 58 | for pkgname in $(changed_pkgs "$MESALOCK_LINUX_PACKAGES" "$commit_range"); do 59 | echo $pkgname 60 | cd $MESALOCK_PACKAGES_DIR && "$MESALOCK_MKPKG_DIR"/target/release/mkpkg build $pkgname 61 | if [ $? -eq 0 ]; then 62 | successful_pkgs="$successful_pkgs $pkgname" 63 | else 64 | failed_pkgs="$failed_pkgs $pkgname" 65 | fi 66 | done 67 | 68 | if [ -n "$successful_pkgs" ]; then 69 | print -s1 -c2 "Successfully build packages:$successful_pkgs\n" 70 | fi 71 | if [ -n "$failed_pkgs" ]; then 72 | die "Failed to build packages:$failed_pkgs" 73 | elif [ -z "$successful_pkgs" ]; then 74 | print -s1 -c3 'No packages found to be built.' 75 | fi 76 | -------------------------------------------------------------------------------- /core-testing/pypy/build.yml: -------------------------------------------------------------------------------- 1 | package: 2 | name: pypy 3 | version: 5.10.0 4 | description: "PyPy is a fast, compliant alternative implementation of the 5 | Python language (2.7.13 and 3.5.3). Note that this is a tailored version. We 6 | exclude some modules which need native libraries written in C/C++." 7 | skip_check: true 8 | license: [MIT] 9 | 10 | source: 11 | - https://bitbucket.org/pypy/pypy/downloads/pypy2-v$version-src.tar.bz2 12 | 13 | build: 14 | - | 15 | cd pypy2-v${version}-src/pypy/goal 16 | 17 | ../../rpython/bin/rpython -Ojit targetpypystandalone.py \ 18 | --withoutmod-_cffi_backend \ 19 | --withoutmod-zipimport \ 20 | --withoutmod-_minimal_curses \ 21 | --withoutmod-bz2 \ 22 | --withoutmod-zlib \ 23 | --withoutmod-_rawffi \ 24 | --withoutmod-pyexpat \ 25 | --withoutmod-_random \ 26 | --withoutmod-crypt \ 27 | --withoutmod-_ssl \ 28 | --withoutmod-_cppyy \ 29 | --withoutmod-_hashlib 30 | 31 | install: 32 | - | 33 | cd pypy2-v"$version"-src 34 | 35 | # Prepare installation (do not package excluded C modules/libraries) 36 | pypy/tool/release/package.py --archive-name pypy --targetdir . \ 37 | --without-audioop \ 38 | --without-curses \ 39 | --without-gdbm \ 40 | --without-pwdgrp \ 41 | --without-resource \ 42 | --without-sqlite3 \ 43 | --without-syslog \ 44 | --without-tk 45 | mkdir unpacked 46 | tar xf pypy.tar.bz2 -C unpacked 47 | 48 | # Install pypy 49 | cd unpacked 50 | install -Dm755 pypy/bin/pypy "${pkgdir}"/opt/pypy/bin/pypy 51 | install -Dm755 pypy/bin/libpypy-c.so "${pkgdir}"/opt/pypy/bin/libpypy-c.so 52 | cp -r pypy/include pypy/lib_pypy pypy/lib-python pypy/site-packages "${pkgdir}"/opt/pypy/ 53 | cd .. 54 | 55 | # Install symlink 56 | mkdir -p "${pkgdir}"/usr/bin "${pkgdir}"/usr/lib 57 | ln -s /opt/pypy/bin/pypy "${pkgdir}"/usr/bin/pypy 58 | ln -s /opt/pypy/bin/libpypy-c.so "${pkgdir}"/usr/lib/libpypy-c.so 59 | 60 | # Install misc stuff 61 | install -Dm644 README.rst "${pkgdir}"/opt/pypy/README.rst 62 | install -Dm644 LICENSE "${pkgdir}"/opt/pypy/LICENSE 63 | install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/pypy/LICENSE 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MesaLock Linux Packages 2 | 3 | [![Build Status](https://ci.mesalock-linux.org/api/badges/mesalock-linux/packages/status.svg?branch=master)](https://ci.mesalock-linux.org/mesalock-linux/packages) 4 | 5 | To ensure the safty and security of the user space environment, unlike other 6 | Linux distributions, packages in MesaLock Linux are written in memory-safe 7 | language (e.g., Rust and Go). We select packages based on three metrics: 8 | quality, functionality and security. Please read the [MesaLock Linux 9 | documentation](https://docs.mesalock-linux.org) to learn more. 10 | 11 | ## Categories 12 | 13 | There are four categories of all packages: 14 | - `core`: core packages to bootstrap the system 15 | - `community`: packages from community 16 | - `core-testing`: new core packages or new version for trying and testing 17 | - `community-testing`: new community packages or new version for trying and testing 18 | 19 | Basically, `core` packages are essential packages to bootstrap the system and 20 | have the basic function. `community` packages are other nice-to-have packages 21 | written in Rust/Go. And `core-testing` and `community-testing` will aggressively 22 | use latest version or newer version code for testing. 23 | 24 | ## Contributing new packages 25 | 26 | A package consists of a `build.yml` script and related files and patches. It is very 27 | simple to include a new package in MesaLock Linux. The `build.yml` is a YAML 28 | file and should contain two parts: metadata and building functions. 29 | 30 | The build tool (`mkpkg`) will make a package in following steps: 31 | 1. downloading source code and/or extract it into `$builddir` directory 32 | 2. `build`: building sources 33 | 3. `check`: testing and checking functions 34 | 3. `install`: zip the output as a package 35 | 36 | There are several pre-defined variables which `mkpkg` will look for: 37 | - `name`, `version`, `description`, `url`, `skip_check` and `license`: package related metadata 38 | - `build`, `check`, `install`: script to build/check/install the package 39 | 40 | Here are several pre-defined environment variables you can use in the script 41 | - `name`, `version`: package metadata information 42 | - `builddir`: directory for building package 43 | - `pkgdir`: directory to install compiled code 44 | 45 | You can find more details in the `mkpkg` project: 46 | [https://github.com/mesalock-linux/mkpkg](https://github.com/mesalock-linux/mkpkg) 47 | 48 | ### Example 49 | 50 | Here is an example of `build.yml` script for `ripgrep`, a Rust grep tool. 51 | 52 | ```yml 53 | package: 54 | name: ripgrep 55 | version: 0.8.0 56 | description: ripgrep combines the usability of The Silver Searcher with the raw speed of grep 57 | license: [MIT, Unlicense] 58 | url: https://github.com/BurntSushi/ripgrep 59 | skip_check: true 60 | 61 | source: 62 | - git+https://github.com/BurntSushi/$name.git 63 | 64 | prepare: 65 | - cd "$name".git && git checkout -B 0.8.0 66 | 67 | build: 68 | - cd "$name".git && cargo build --release 69 | - cd "$name".git && cargo test 70 | 71 | install: 72 | - cd "$name".git && install -D -m744 target/release/rg -t "$pkgdir"/bin/ 73 | ``` 74 | 75 | ## Maintainer 76 | 77 | - Mingshen Sun `` [@mssun](https://github.com/mssun) 78 | 79 | ## License 80 | 81 | The MesaLock Linux Packages project is provided under the [BSD license](LICENSE). 82 | --------------------------------------------------------------------------------