add tier option
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
FROM archlinux/archlinux:base-devel
|
||||
|
||||
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
||||
COPY scripts/pacman.conf.arch/* /scripts/pacman.conf/
|
||||
COPY scripts/pacman.conf.arch/pacman.conf.pl /scripts/pacman.conf.pl
|
||||
|
||||
ARG MIRROR=https://mirror.sanin.dev/arch-linux/\$repo/os/\$arch
|
||||
|
||||
RUN sed -i "1iServer = $MIRROR" /etc/pacman.d/mirrorlist && \
|
||||
pacman -Syu --noconfirm git clang sudo devtools vim bash-completion && \
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/lib/pacman/sync /var/cache/pacman/pkg && \
|
||||
git config --global init.defaultBranch "master" && \
|
||||
chmod +x /scripts/* && \
|
||||
useradd -m user && \
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
FROM artixlinux/artixlinux:base-devel
|
||||
|
||||
COPY scripts/entrypoint.sh /scripts/entrypoint.sh
|
||||
COPY scripts/pacman.conf.artix/* /scripts/pacman.conf/
|
||||
COPY scripts/pacman.conf.artix/pacman.conf.pl /scripts/pacman.conf.pl
|
||||
|
||||
ARG MIRROR=https://mirror.sanin.dev/artix-linux/\$repo/os/\$arch
|
||||
|
||||
RUN sed -i "1iServer = $MIRROR" /etc/pacman.d/mirrorlist && \
|
||||
pacman -Syu --noconfirm git clang sudo vim glibc openssh bash-completion && \
|
||||
pacman -Scc --noconfirm && \
|
||||
rm -rf /var/lib/pacman/sync /var/cache/pacman/pkg && \
|
||||
git config --global init.defaultBranch "master" && \
|
||||
chmod +x /scripts/* && \
|
||||
useradd -m user && \
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -n "$DEP" ] && [ "$DEP" != "stable" ]
|
||||
then
|
||||
sudo cp "/scripts/pacman.conf/pacman.$DEP.conf" "/etc/pacman.conf" && \
|
||||
sudo pacman -Syu --noconfirm --noprogressbar
|
||||
fi
|
||||
/scripts/pacman.conf.pl | sudo tee "/etc/pacman.conf" > /dev/null
|
||||
|
||||
if [ -z "$REPO" ]
|
||||
then
|
||||
/bin/bash
|
||||
exit $?;
|
||||
else
|
||||
sudo pacman -Syu --noconfirm --noprogressbar
|
||||
fi
|
||||
|
||||
checkoutCommit() {
|
||||
@@ -34,6 +32,14 @@ postEntrypoint() {
|
||||
fi
|
||||
}
|
||||
|
||||
doBuild() {
|
||||
if [ -n "$POST" ] && [ -x "./post-entrypoint.sh" ] ; then
|
||||
makepkg -smf --noconfirm --noprogressbar --skippgpcheck
|
||||
else
|
||||
makepkg -smf --noconfirm --noprogressbar --skippgpcheck --noarchive
|
||||
fi
|
||||
}
|
||||
|
||||
changeDir() {
|
||||
if [ -n "$CD" ]
|
||||
then
|
||||
@@ -50,6 +56,6 @@ cd "$DIR" && \
|
||||
checkoutCommit && \
|
||||
applyPatch && \
|
||||
sudo pacman -Syu --noconfirm --noprogressbar &&\
|
||||
makepkg -smf --noconfirm --noprogressbar --skippgpcheck && \
|
||||
doBuild && \
|
||||
postEntrypoint
|
||||
exit $?;
|
||||
|
||||
48
docker/scripts/pacman.conf.arch/pacman.staging.conf → docker/scripts/pacman.conf.arch/pacman.conf.pl
Normal file → Executable file
48
docker/scripts/pacman.conf.arch/pacman.staging.conf → docker/scripts/pacman.conf.arch/pacman.conf.pl
Normal file → Executable file
@@ -1,3 +1,12 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $dep = $ENV{DEP} // 'stable';
|
||||
my $tier = $ENV{TIER} // '1';
|
||||
|
||||
#region header
|
||||
print <<'EOHEADER';
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
@@ -12,24 +21,61 @@ DownloadUser = alpm
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
EOHEADER
|
||||
#endregion
|
||||
|
||||
#region core
|
||||
if ($dep eq 'staging') {
|
||||
print <<'EOCORESTAGING';
|
||||
[core-staging]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOCORESTAGING
|
||||
}
|
||||
|
||||
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||
print <<'EOCORETESTING';
|
||||
[core-testing]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOCORETESTING
|
||||
}
|
||||
|
||||
print <<'EOCORE';
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOCORE
|
||||
#endregion
|
||||
|
||||
#region extra
|
||||
if ($tier ne '0') {
|
||||
if ($dep eq 'staging') {
|
||||
print <<'EOEXTRASTAGING';
|
||||
[extra-staging]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOEXTRASTAGING
|
||||
}
|
||||
|
||||
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||
print <<'EOEXTRATESTING';
|
||||
[extra-testing]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOEXTRATESTING
|
||||
}
|
||||
|
||||
print <<'EOEXTRA';
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOEXTRA
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region options
|
||||
print <<'EOOPTIONS';
|
||||
[options]
|
||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
||||
@@ -43,3 +89,5 @@ NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/cha
|
||||
NoExtract = usr/share/man/* usr/share/info/*
|
||||
NoExtract = usr/share/vim/vim*/lang/*
|
||||
NoExtract = etc/pacman.conf etc/pacman.d/mirrorlist
|
||||
EOOPTIONS
|
||||
#endregion
|
||||
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
|
||||
[options]
|
||||
HoldPkg = pacman glibc
|
||||
Architecture = auto
|
||||
NoProgressBar
|
||||
VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
DownloadUser = alpm
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
|
||||
[core-testing]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra-testing]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[options]
|
||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
||||
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/*
|
||||
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
|
||||
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*
|
||||
NoExtract = !usr/share/*locales/trans*
|
||||
NoExtract = !usr/share/X11/locale/C/*
|
||||
NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/*
|
||||
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
||||
NoExtract = usr/share/man/* usr/share/info/*
|
||||
NoExtract = usr/share/vim/vim*/lang/*
|
||||
NoExtract = etc/pacman.conf etc/pacman.d/mirrorlist
|
||||
65
docker/scripts/pacman.conf.artix/pacman.staging.conf → docker/scripts/pacman.conf.artix/pacman.conf.pl
Normal file → Executable file
65
docker/scripts/pacman.conf.artix/pacman.staging.conf → docker/scripts/pacman.conf.artix/pacman.conf.pl
Normal file → Executable file
@@ -1,3 +1,12 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $dep = $ENV{DEP} // 'stable';
|
||||
my $tier = $ENV{TIER} // '1';
|
||||
|
||||
#region header
|
||||
print <<'EOHEADER';
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
@@ -12,33 +21,87 @@ DownloadUser = alpm
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
EOHEADER
|
||||
#endregion
|
||||
|
||||
#region system
|
||||
if ($dep eq 'staging') {
|
||||
print <<'EOSYSTEMSTAGING';
|
||||
[system-goblins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOSYSTEMSTAGING
|
||||
}
|
||||
|
||||
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||
print <<'EOSYSTEMTESTING';
|
||||
[system-gremlins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOSYSTEMTESTING
|
||||
}
|
||||
|
||||
print <<'EOSYSTEM';
|
||||
[system]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOSYSTEM
|
||||
#endregion
|
||||
|
||||
#region world
|
||||
if ($tier ne '0') {
|
||||
if ($dep eq 'staging') {
|
||||
print <<'EOWORLDSTAGING';
|
||||
[world-goblins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOWORLDSTAGING
|
||||
}
|
||||
|
||||
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||
print <<'EOWORLDTESTING';
|
||||
[world-gremlins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOWORLDTESTING
|
||||
}
|
||||
|
||||
print <<'EOWORLD';
|
||||
[world]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOWORLD
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region galaxy
|
||||
if ($tier eq '2') {
|
||||
if ($dep eq 'staging') {
|
||||
print <<'EOGALAXYSTAGING';
|
||||
[galaxy-goblins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOGALAXYSTAGING
|
||||
}
|
||||
|
||||
if ($dep eq 'staging' || $dep eq 'testing') {
|
||||
print <<'EOGALAXYTESTING';
|
||||
[galaxy-gremlins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOGALAXYTESTING
|
||||
}
|
||||
|
||||
print <<'EOGALAXY';
|
||||
[galaxy]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
EOGALAXY
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region options
|
||||
print <<'EOOPTIONS';
|
||||
[options]
|
||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
||||
@@ -51,3 +114,5 @@ NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/
|
||||
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
||||
NoExtract = usr/share/man/* usr/share/info/*
|
||||
NoExtract = usr/share/vim/vim*/lang/*
|
||||
EOOPTIONS
|
||||
#endregion
|
||||
@@ -1,44 +0,0 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
|
||||
[options]
|
||||
HoldPkg = pacman glibc
|
||||
Architecture = auto
|
||||
NoProgressBar
|
||||
VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
DownloadUser = alpm
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
[system-gremlins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[system]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[world-gremlins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[world]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[galaxy-gremlins]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[galaxy]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[options]
|
||||
NoExtract = usr/share/help/* !usr/share/help/en* !usr/share/help/C/*
|
||||
NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
|
||||
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/*
|
||||
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
|
||||
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*
|
||||
NoExtract = !usr/share/*locales/trans*
|
||||
NoExtract = !usr/share/X11/locale/C/*
|
||||
NoExtract = !usr/share/X11/locale/compose.dir !usr/share/X11/locale/iso8859-1/*
|
||||
NoExtract = !usr/share/*locales/C !usr/share/*locales/POSIX !usr/share/i18n/charmaps/ANSI_X3.4-1968.gz
|
||||
NoExtract = usr/share/man/* usr/share/info/*
|
||||
NoExtract = usr/share/vim/vim*/lang/*
|
||||
Reference in New Issue
Block a user