-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WiP] Draft for Gentoo configuration #611
base: master
Are you sure you want to change the base?
Changes from 17 commits
27ca573
304d24e
32cd210
91df306
3428ab9
7f72cf7
01fd95a
a5df85f
39b79fc
6bca6f5
9b0d75f
c8cb922
456c479
30ab193
e7f1720
758951b
8b5df1d
722e555
5420c04
54c98f6
5fd6303
cc0d86e
6887052
6d76eb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,3 +146,4 @@ cython_debug/ | |
|
||
# Pycharm | ||
.idea/ | ||
venvs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,12 @@ | |
"type": "string", | ||
"enum": [ | ||
"apt", | ||
"portage", | ||
"yum" | ||
], | ||
"examples": [ | ||
"apt", | ||
"portage", | ||
"yum" | ||
] | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### This file contains system-wide build variables, including Gentoo variables such as USE, which enable/disable optional package features. | ||
|
||
COMMON_FLAGS="-O2 -pipe -march=native" | ||
# Comment the following out on systems with less than 8 threads | ||
MAKEOPTS="--jobs 8 --load-average 9" | ||
CFLAGS="${COMMON_FLAGS}" | ||
CXXFLAGS="${COMMON_FLAGS}" | ||
FCFLAGS="${COMMON_FLAGS}" | ||
FFLAGS="${COMMON_FLAGS}" | ||
|
||
# NOTE: This stage was built with the bindist Use flag enabled | ||
|
||
# This sets the language of build output to English. | ||
# Please keep this setting intact when reporting bugs. | ||
LC_MESSAGES=C | ||
|
||
USE="${USE} science" | ||
ACCEPT_LICENSE="*" | ||
|
||
# Needed in the container environment | ||
#FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
### This is needed because ::science packages are generally not marked as stable | ||
*/* ~amd64 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
### This is empty, thankfully. | ||
### If we find bugs in some version of some package we can blacklist the package, version, or feature that causes it here. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[gentoo] | ||
location = /var/db/repos/gentoo | ||
# We sync manually, but we need sync-uri to be written down somewhere to do so | ||
sync-type = git | ||
sync-uri = https://anongit.gentoo.org/git/repo/gentoo.git | ||
sync-git-verify-commit-signature = yes |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[science] | ||
location = /var/db/repos/science | ||
# We sync manually, but we need sync-uri to be written down somewhere to do so | ||
sync-type = git | ||
sync-uri = https://anongit.gentoo.org/git/proj/sci.git | ||
priority = 7777 |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,65 @@ | ||||||||||||||||||||
--- | ||||||||||||||||||||
# Instructions to add NeuroDebian repositories. | ||||||||||||||||||||
|
||||||||||||||||||||
name: gentoo | ||||||||||||||||||||
url: https://www.gentoo.org/ | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is nothing gentoo below yet, misleading commit message etc. Please squash it with whatever actually gentoo specific changes you place into this PR |
||||||||||||||||||||
binaries: | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
TODO: defaults somehow -- may be just straight in the code as |
||||||||||||||||||||
# ATM template jsonschema demands having urls and instructions. | ||||||||||||||||||||
# In the future we might use urls to point to git repositories | ||||||||||||||||||||
# which are currently under gentoo-portage/ config files. | ||||||||||||||||||||
urls: | ||||||||||||||||||||
something: not-used | ||||||||||||||||||||
arguments: | ||||||||||||||||||||
optional: | ||||||||||||||||||||
gentoo_hash: "0e9370b45a589867220384ca6c63bc6bcaec3f74" | ||||||||||||||||||||
science_hash: "5307342730267714f7019d62f77b2d9bf7624d8c" | ||||||||||||||||||||
# Below echo commands will be indented by _indent_run_instruction which | ||||||||||||||||||||
# would cause trailing spaces to be added to the files. But it should be ok | ||||||||||||||||||||
# for us, thus we are not bothering to workaround via inlining. | ||||||||||||||||||||
instructions: | | ||||||||||||||||||||
mkdir -p /etc/portage/; \ | ||||||||||||||||||||
echo -e "\ | ||||||||||||||||||||
\nCOMMON_FLAGS=\"-O2 -pipe -march=native\" \ | ||||||||||||||||||||
\nMAKEOPTS=\"--jobs 8 --load-average 9\" \ | ||||||||||||||||||||
\nCFLAGS=\"\${COMMON_FLAGS}\" \ | ||||||||||||||||||||
\nCXXFLAGS=\"\${COMMON_FLAGS}\" \ | ||||||||||||||||||||
\nFCFLAGS=\"\${COMMON_FLAGS}\" \ | ||||||||||||||||||||
\nFFLAGS=\"\${COMMON_FLAGS}\" \ | ||||||||||||||||||||
\nLC_MESSAGES=C \ | ||||||||||||||||||||
\nUSE=\"\${USE} science\" \ | ||||||||||||||||||||
\nACCEPT_LICENSE=\"*\" \ | ||||||||||||||||||||
" > "/etc/portage/make.conf"; \ | ||||||||||||||||||||
mkdir -p "/etc/portage/package.accept_keywords"; \ | ||||||||||||||||||||
echo -e "*/* ~amd64" > "/etc/portage/package.accept_keywords/gen" ; \ | ||||||||||||||||||||
mkdir -p "/etc/portage/package.mask"; \ | ||||||||||||||||||||
touch "/etc/portage/package.mask/bugs"; \ | ||||||||||||||||||||
mkdir -p "/etc/portage/repos.conf" ; \ | ||||||||||||||||||||
echo -e "[gentoo] \ | ||||||||||||||||||||
\nlocation = /var/db/repos/gentoo \ | ||||||||||||||||||||
\nsync-type = git \ | ||||||||||||||||||||
\nsync-uri = https://anongit.gentoo.org/git/repo/gentoo.git \ | ||||||||||||||||||||
\nsync-git-verify-commit-signature = yes" > "/etc/portage/repos.conf/gentoo"; \ | ||||||||||||||||||||
echo -e "[science] \ | ||||||||||||||||||||
\nlocation = /var/db/repos/science \ | ||||||||||||||||||||
\nsync-type = git \ | ||||||||||||||||||||
\nsync-uri = https://anongit.gentoo.org/git/proj/sci.git \ | ||||||||||||||||||||
\npriority = 7777" > "/etc/portage/repos.conf/science"; \ | ||||||||||||||||||||
emerge -v --noreplace dev-vcs/git \ | ||||||||||||||||||||
&& emerge -v1u portage \ | ||||||||||||||||||||
&& mkdir /outputs \ | ||||||||||||||||||||
&& rm /var/db/repos/gentoo -rf \ | ||||||||||||||||||||
&& git config --global init.defaultBranch master \ | ||||||||||||||||||||
&& \ | ||||||||||||||||||||
set -x && export GIT_TRACE=1 && \ | ||||||||||||||||||||
REPO_URL=$(grep "^sync-uri" /etc/portage/repos.conf/gentoo | sed -e "s/sync-uri *= *//g") && \ | ||||||||||||||||||||
git clone --depth 1 ${REPO_URL} /var/db/repos/gentoo && \ | ||||||||||||||||||||
cd /var/db/repos/gentoo && \ | ||||||||||||||||||||
git fetch --depth 1 origin {{ self.gentoo_hash }} && \ | ||||||||||||||||||||
git reset --hard {{ self.gentoo_hash }} && \ | ||||||||||||||||||||
rm .git -rf && \ | ||||||||||||||||||||
REPO_URL=$(grep "^sync-uri" /etc/portage/repos.conf/science | sed -e "s/sync-uri *= *//g") && \ | ||||||||||||||||||||
git clone --depth 1 ${REPO_URL} /var/db/repos/science && \ | ||||||||||||||||||||
cd /var/db/repos/science && \ | ||||||||||||||||||||
git fetch --depth 1 origin {{ self.science_hash }} && \ | ||||||||||||||||||||
git reset --hard {{ self.science_hash }} && \ | ||||||||||||||||||||
rm .git -rf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all the files should be produced by the Dockerfile script, not required to be copied since will need then a copy etc... mess. See https://github.com/nimh-dsst/dsst-defacing-pipeline/pull/41/files