Giter Site home page Giter Site logo

minos-static's Introduction

About

Build Status

Static linking is a technique where all the dependencies of a program are copied into the executable image, this requires extra disk space and memory (multiple copies of the same dependency could be located in several programs) but helps with portability and ease of usage, just download the binary and run it. Dynamic linking on the other hand is accomplished by placing only a reference of a sharable library in the executable. Actual linking with the library routines does not occur until the image is run, when both the executable and the library are placed in memory. An advantage of dynamic linking is that multiple programs can share a single copy of the library which saves space and allows to provide security updates efficiently.

On Linux, most distributions use dynamic linking because of the above advantages, however at the same time that is also the cause of being binary incompatible with others, or even with themselves in different releases. Since dynamic linking requires a strict management of global libraries most Linux package systems require administration privileges to install new software and don't allow to install several versions of the same application. With static linking there is no need for special privileges unless it's desired to place the static binary in a global context and it's possible to have several versions of the same program without conflicts.

Unfortunately, currently static linking on Linux is hard, in most cases -static isn't enough, and the usage of special functions (such as gethostbyname, getpwnam_r, etc) and other referenced content (such as terminfo files) doesn't help, even glibc size can discourage the creation of such files. If you want to compile your own static binaries chances are that you'll require to patch your desired software and its dependencies and link them against an alternative libc implementation, such dietlibc, uclibc or musl. This repository aim to fix that. By compiling meta-recipes and publish them to http://s.minos.io, the process can be reduced to:

$ static-get tmux
tmux-1.9a.tar.xz

There are more than 1000 packages and the list is growing constantly, a verbose list of all of them can be retrieved with:

$ static-get --search

Recipes

static-get builds on top of several amazing projects, as such, it's desirable to report to them when appropiated or to its minos deltas when in doubt.

New recipes are welcome =)!

Mirroring

static-get hasn't been designed to syncronizate data between servers, if you're intested in mirroring all the archive, please use one of the following methods:

  • rsync -azvL --delete rsync://s.minos.io/mirror/ /usr/local/linux-static-mirror

The recipes are run by minos-sync-bot and sync once every day.

minos-static's People

Contributors

climbthestairs avatar divinity76 avatar haletom avatar hdorio avatar javier-lopez avatar maxpeal avatar nguyenmp avatar the-djdj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

minos-static's Issues

Add fdupes into repository.

This tools is a command line tools which search/auto delete
duped files in one directory.

https://github.com/adrianlopezroche/fdupes/releases

I have try to compile it, it very easy to sucess in my OS (slackware 14.2)

 ╰─ $ make fdupes
cc -Wall -O -g -static -I. -DVERSION=\"1.6.1\"  -D_FILE_OFFSET_BITS=64   -c -o fdupes.o fdupes.c
cc -Wall -O -g -static -I. -DVERSION=\"1.6.1\"  -D_FILE_OFFSET_BITS=64   -c -o md5/md5.o md5/md5.c
cc -Wall -O -g -static -I. -DVERSION=\"1.6.1\"  -D_FILE_OFFSET_BITS=64  -o fdupes fdupes.o md5/md5.o 

 ╰─ $ ldd fdupes
	not a dynamic executable

Archive down?

After cloning this repo and running ./static-get gcc, I receive the error message:

no available packages at s.minos.io/archive, it may be an incorrect url or could be down temporarily

However, I am still able to access http://s.minos.io/archive/ regularly with my browser.

Am I doing something wrong? Are there any installation steps I must do before running the script?

Include transmission-daemon

Transmission-daemon is a commonly used BitTorrent client used on many NAS devices. The problem is that eventually those devices no longer receive any updates. It would be great to use new (static) Transmission versions on older hardware to increase its lifespan.

TLS

Love this project but have one major reservation: it’s lacking TLS.

So, if I do: static-get nice-thing and the man in the middle sends me nasty-thing, I end up running nasty-thing.

If the minos.io site is a static site, getting it up and running with TLS could be as simple as a few minutes with something like Site.js (and I’m happy to help if you’d like to go down that route).

Update opt-emacs-23.2-2.tar.xz to emacs 24.5 or 25.1?

Current version:

opt-emacs-23.2-2.tar.xz:568183a2e702106fb53e4315333476f909531927fe27a2c07c9a3c31e904d13ddf96f9c9400c81a465169ee4754774004a5295095ea841d7ffae987f072c86e7

Emacs 23.2.1 is fine, I just want to know, emacs 25.1 is out.
at least, emacs 24.5 is stable enough to build a new version?

after all, emacs 23.2.1 is a ten years ago version ...

Thanks.

Issue with grep

I was really happy when I saw this project and think it can have lots of uses. I always thought that the packagers are useless. Wherever it's apt-get or yum they never thought a --user option would be useful and you can only run those programs if you own the machine and are sudo on it. Trying to compile software always ends in tears as you chase one dependency after an other.

As I see it we have gone through over a decade of developer and system administrator centric software distribution and it might only start changing to a user-centric model.

Developers are often against static linking, but that's what every user wants !

I was unable to compile tmux on the server I'm using (it has SUSE Linux Enterprise Server 11 SP3) so I tried this command, but it didn't work:

xapple@sisu ~ $ sh <(wget -qO- s.minos.io/s) -s -v tmux
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

This command did work perfectly however:

xapple@sisu ~ $ sh <(wget -qO- http://s.minos.io/s) -x tmux-2.1

static-get for mu, a very fast email index tools

https://github.com/djcb/mu

Following is my dynamic link mu dependency:

ldd /home/zw963/utils/mail/bin.real/mu 
	linux-vdso.so.1 (0x00007ffe853fb000)
	libxapian.so.22 => /usr/lib64/../lib64/libxapian.so.22 (0x00007fbc6a73e000)
	libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fbc6a514000)
	libgmime-2.6.so.0 => /usr/lib64/../lib64/libgmime-2.6.so.0 (0x00007fbc6a2a5000)
	libgthread-2.0.so.0 => /usr/lib64/../lib64/libgthread-2.0.so.0 (0x00007fbc6a0a3000)
	libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fbc69e88000)
	libguile-2.0.so.22 => /usr/lib64/../lib64/libguile-2.0.so.22 (0x00007fbc69aff000)
	libunistring.so.0 => /usr/lib64/../lib64/libunistring.so.0 (0x00007fbc697ea000)
	libgmp.so.10 => /usr/lib64/../lib64/libgmp.so.10 (0x00007fbc69573000)
	libltdl.so.7 => /usr/lib64/../lib64/libltdl.so.7 (0x00007fbc6936a000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fbc69132000)
	libgc.so.1 => /usr/lib64/../lib64/libgc.so.1 (0x00007fbc68dce000)
	libstdc++.so.6 => /usr/lib64/../lib64/libstdc++.so.6 (0x00007fbc68a54000)
	libgio-2.0.so.0 => /usr/lib64/../lib64/libgio-2.0.so.0 (0x00007fbc686d7000)
	libgmodule-2.0.so.0 => /usr/lib64/../lib64/libgmodule-2.0.so.0 (0x00007fbc684d2000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fbc682ce000)
	libz.so.1 => /usr/lib64/../lib64/libz.so.1 (0x00007fbc680b9000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fbc67e9d000)
	libgobject-2.0.so.0 => /usr/lib64/../lib64/libgobject-2.0.so.0 (0x00007fbc67c4c000)
	libffi.so.6 => /usr/lib64/../lib64/libffi.so.6 (0x00007fbc67a44000)
	libglib-2.0.so.0 => /usr/lib64/../lib64/libglib-2.0.so.0 (0x00007fbc6770c000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbc674ef000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fbc671e6000)
	libgcc_s.so.1 => /usr/lib64/../lib64/libgcc_s.so.1 (0x00007fbc66fce000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fbc66c05000)
	/lib64/ld-linux-x86-64.so.2 (0x00005594a003d000)

Thanks.

Archive down for aarch64

bash -x static-get gcc
+ VERSION=2020.02.11-00:21
+ LATEST_URI_BASENAME=https://raw.githubusercontent.com/minos-org/minos-static/master
++ _basename static-get
++ '[' -z static-get ']'
++ _basename__name=static-get
++ '[' -z '' ']'
++ case "${_basename__name}" in
++ '[' -n '' ']'
++ printf '%s\n' static-get
+ progname=static-get
+ tmpcache=/tmp/static-get
+ '[' '!' -t 0 ']'
+ '[' 1 -eq 0 ']'
+ for arg in "${@}"
+ case "${arg}" in
+ '[' -z '' ']'
+ '[' 1 -eq 0 ']'
+ _static_get gcc
+ '[' -z gcc ']'
+ _set_defaults
+ '[' -z '' ']'
+ mirror=s.minos.io/archive
+ '[' -z '' ']'
++ _uniq_id_mirror s.minos.io/archive
++ printf '%s\n' s.minos.io/archive
++ sed 's|/|##|g'
+ uniq_id_mirror=s.minos.io##archive
+ '[' -z '' ']'
+ distro=all
+ '[' -z '' ']'
++ uname -m
+ arch=aarch64
+ '[' -z '' ']'
+ directory=.
+ '[' X = X- ']'
+ '[' -z '' ']'
+ _mkdir_p .
+ '[' -n . ']'
+ for _mkdir_p__dir in "${@}"
+ '[' -d . ']'
+ continue
+ case "${arch}" in
++ uname -m
+ _verbose 'aarch64 is not a valid architecture, using system default: aarch64'
+ '[' -z 'aarch64 is not a valid architecture, using system default: aarch64' ']'
+ '[' -n '' ']'
+ :
++ uname -m
+ arch=aarch64
+ case "${compress_format}" in
+ command -v xzcat
+ compress_format=xz
+ compress_bin=xzcat
+ case "${checksum}" in
+ command -v shasum
+ checksum=sha512
+ checksum_bin='shasum -a 512'
+ command -v wget
+ retriever_bin='wget -q'
++ _get_available_distros s.minos.io/archive
++ '[' -z s.minos.io/archive ']'
++ '[' -z s.minos.io##archive ']'
++ _mkdir_p /tmp/static-get.s.minos.io##archive
++ '[' -n /tmp/static-get.s.minos.io##archive ']'
++ for _mkdir_p__dir in "${@}"
++ '[' -d /tmp/static-get.s.minos.io##archive ']'
++ continue
++ '[' '!' -f /tmp/static-get.s.minos.io##archive/index.html ']'
++ awk '-F"' '/href/ {if ($2 != "../" && $2 != "robots.txt") {sub(/\//,"",$2);print $2}}' /tmp/static-get.s.minos.io##archive/index.html
+ available_distros=
+ '[' -z '' ']'
+ printf '%s\n' 'no available packages at s.minos.io/archive, it may be an incorrect url or could be down temporarily'
no available packages at s.minos.io/archive, it may be an incorrect url or could be down temporarily
+ exit 1

Request for latest tmux

Hi !

A new version of tmux 2.2 is out since April 10. Do you think you could add it to the repository ? Thanks !

allow parameters to be specified in any order

Been testing a little, static-get -p /tmp/opt -i htop works great, but specifying the parameters in a different order doesn't work:

❯ ./static-get -i htop -p /tmp/opt              
Option '-p' requires a parameter -p   

I get the same issue using the other possible options (such as -d), perhaps it's an issue with how the arguments are handled?

The accepted PR should fix this behaviour and add test coverage.

Archive appears to be down

As of right now, trying to get any package appears to fail:

% ./static-get tmux
no available packages at s.minos.io/archive, it may be an incorrect url or could be down temporarily

It appears that the archive is currently down.

## Failed to fetch source for musl-1.1.8-1! / Warning: 'musl-1.1.8.tar.gz:' is an invalid FILE:CHECKSUM pair, skipping...

env done like https://github.com/minos-org/minos-static/wiki/new-recipes#new-package

user@debian:/minos-static/bifrost-build$ sudo ./chroot-i586-build.sh musl-1.1.8-1
sudo ./chroot-i586-build.sh musl-1.1.8-1

  • sudo ./chroot-i586-build.sh musl-1.1.8-1
    Fetching musl-1.1.8-1 ..

Failed to fetch source for musl-1.1.8-1!

wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
Warning: 'musl-1.1.8.tar.gz:' is an invalid FILE:CHECKSUM pair, skipping...

Building musl-1.1.8-1 from /var/lib/build/all/musl-1.1.8-1
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
wget: not an http or ftp url: /var/spool/src/musl-1.1.8.tar.gz
Warning: 'musl-1.1.8.tar.gz:' is an invalid FILE:CHECKSUM pair, skipping...
ERROR: Build unsuccessful [1]. See /var/log/build/musl-1.1.8-1.log and /var/tmp/src
user@debian:/minos-static/bifrost-build$

'package' doesn't match hashsum => 'hashsum', clean the cache and try again

Hello, I'm currently experimenting with static-get on a minimal system with nothing but busybox and network support but whenever I go to install the package 'nano', I just get an error for an incorrect hashsum. I've even tried to clear the cache by ./static-get.sh -c and it could say the cache is cleared but when I try to install it again with ./static-get.sh nano I would just get that error.

Terminal Output:

Thanks! I also tried with the current static-get script and the http://s.minos.io/s download but both give same error.

feature request: output tar to stdout

Would it be much effort to implement a command to output the downloaded tar to stdout?

Of course I can always wrap static-get into an own script, but it would be much more comfortable to have this feature already in the original ...

s.minos.io x86_64 binaries compiled 32-bit?

It seems that the binaries in the x86_64 directory (for example, bash), are compiled 32-bit:

$ ./static-get -x -a x86_64 bash
bash-4.4-1.tar.xz
bash-4.4-1/
$ file bash-4.4-1/bin/bash
bash-4.4-1/bin/bash: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), statically linked, stripped

Deprecated protocol git://

Running

sudo ./bifrost-autobuild init

gives

  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

I recommend switching to https protocol.

htop not working on ubuntu 18.04

htop.tar.xz
root@xDevAd:/temp2# tar xf htop.tar.xz 
root@xDevAd:/temp2# ./bin/htop --version
htop 1.0.3 - (C) 2004-2012 Hisham Muhammad
Released under the GNU GPL.

root@xDevAd:/temp2# ./bin/htop
Error opening terminal: xterm-256color.

(could also mention that 1.0.3 is a very old version)

404 on website,

Thu May 27 02:55:13 PM NZST 2021 image@archlinux:~/ArchBuild/minos-static$ ./static-get --search
no available packages at s.minos.io/archive, it may be an incorrect url or could be down temporarily

nano not worked in docker container. Thanks.

nano not worked for me in docker container, I have report this issue in your's blog too.

Following is some info:

ls /lib/terminfo/

E a c d h l m p r s v w x

export TERMINFO=/lib/terminfo

echo $TERM

dumb

nano

Error opening terminal: unknown.

Thanks.

cat /etc/issue

Debian GNU/Linux 8 \n \l

download integrity?

Hi,

A quick skim through the static-get source seems to indicate that downloads are hardcoded to use plaintext HTTP, and that one only specifies the hostname+ part of the URL as a mirror. As this seems to indicate that there is no transport encryption/integrity in place, is there some other signing scheme used? I can't seem to find any use of gpg or openssl in the script.

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.