mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 02:56:00 +00:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 93115e4073 | |||
| 12537cbfb0 | |||
| d397ee463a | |||
| dfe55331e6 | |||
| 0c69bfb9a9 | |||
| 689e48a2f7 | |||
| 82e334a93a | |||
| ab6c4a674f | |||
| 78de1a6a13 | |||
| 74e79ffea2 | |||
| bb21809c73 | |||
| e912d4e6ae | |||
| 340b6a74d4 | |||
| 2e8f9ef0ab | |||
| 4bdd1765c5 | |||
| 45f39671d6 | |||
| 1d46a683e0 | |||
| 41d2113b8a | |||
| 528cd77168 | |||
| 916ce142bb | |||
| e2a3b113f2 | |||
| 0acf617611 | |||
| 39aeb852fe | |||
| 0e7d7e336d | |||
| 2323c9924f | |||
| da1f1f7483 | |||
| 723a925ed8 | |||
| 7e9ee1949d | |||
| f0df3f7809 | |||
| 9f77c5b172 | |||
| 3c52bbd7d7 | |||
| 7203329212 | |||
| b76562fe35 | |||
| 657bf44505 | |||
| c0e4bbf18e | |||
| 38b5e792cd | |||
| 43a333f08f | |||
| 9985956b7c | |||
| 7a62e62b28 | |||
| 92977583a6 | |||
| b8d121260a | |||
| ace60d849e | |||
| a2759eca40 | |||
| 7d0977c785 | |||
| 9184a2fd62 | |||
| e80c6eb4bd | |||
| 5cf5fd71cb | |||
| 4b01a5a9cd | |||
| 4910ef0882 | |||
| 1518adace0 | |||
| ef0e792c3d | |||
| 1bb7b0c471 | |||
| 51dc7a7c24 | |||
| c8848dbdb2 | |||
| 92e045116a | |||
| 1f3475a1ef | |||
| f836786e2d | |||
| 7dc88fd01a | |||
| 250efaef8f | |||
| c6532c6759 | |||
| f1c85e3294 | |||
| f5abc3a8d3 | |||
| 74d5bc42f5 | |||
| d6cc120a3c | |||
| 71c1bd013f |
+18
-11
@@ -20,8 +20,7 @@ RPMS ?= $(LATEST_RPMS)
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
|
||||
# MOCK_CONFIG_VAL is set in Makefile.shared
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL)
|
||||
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL) $(MOCK_OPTS)
|
||||
|
||||
ifneq ($(wildcard upstream),)
|
||||
__allsources := $(notdir $(strip $(shell cat upstream)))
|
||||
@@ -89,6 +88,7 @@ prebuild-checks:
|
||||
#help files and rpms in the results directory of your package. If there
|
||||
#help are mutlple tar.gz files for a package, make will do make sources,
|
||||
#help which creates a src.rpm file from the spec file.
|
||||
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options.
|
||||
build: prebuild-checks configemail $(SPECFILE) upstream $(SRPMFILE)
|
||||
$(MOCK) $(SRPMFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
||||
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
||||
@@ -150,8 +150,10 @@ pullrebase:
|
||||
|
||||
#help autospec: automatically generates a specfile. If there is
|
||||
#help already a specfile, it will be overwritten. Several files used by
|
||||
#help autospec will be created in the process. For more information, see
|
||||
#help the project at https://github.com/clearlinux/autospec
|
||||
#help autospec will be created in the process.
|
||||
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options
|
||||
#help to autospec.
|
||||
#help For more information, see the project at https://github.com/clearlinux/autospec
|
||||
autospec: pullrebase localreponotice
|
||||
rm -f results/*src.rpm
|
||||
@if [ -e $(SPECFILE) ] && ! grep -q "# Generated by: autospec.py" $(SPECFILE) ; then \
|
||||
@@ -166,6 +168,7 @@ autospec: pullrebase localreponotice
|
||||
--name $(PKG_NAME) \
|
||||
--archives $(ARCHIVES) \
|
||||
--mock-config $(MOCK_CONFIG_VAL) \
|
||||
--mock-opts "$(MOCK_OPTS)" \
|
||||
$${SETVERSION:+ --version $${SETVERSION}} \
|
||||
${NON_INTERACTIVE} ${SKIP_GIT} ${CLEANUP} \
|
||||
$(firstword $(NEWURL) $(URL));
|
||||
@@ -209,7 +212,7 @@ $(__missingsources): sources
|
||||
define fetch-from-srpm
|
||||
tmp=$$(mktemp -d -p "."); \
|
||||
srpm=$$(rpmspec --srpm -q --qf "%{NVR}.src.rpm\n" $(SPECFILE)); \
|
||||
if cd "$$tmp" && ! curl -s -S -f -L -O $(DOWNLOAD_MIRROR)/releases/$(1)/clear/source/SRPMS/$$srpm; then \
|
||||
if cd "$$tmp" && ! curl -s -S -f -L -O $(MIRROR_CURL_OPTS) $(DOWNLOAD_MIRROR)/releases/$(1)/clear/source/SRPMS/$$srpm; then \
|
||||
echo "Failed to download $$srpm from Clear Linux release $(1)." >&2; \
|
||||
cd .. && rm -rf "$$tmp"; \
|
||||
exit 1; \
|
||||
@@ -246,7 +249,7 @@ sources: upstream
|
||||
*://*) n="$$u" ;; \
|
||||
*) n="$(SOURCES_URL)/$$u" ;; \
|
||||
esac; \
|
||||
if ! curl --fail -L "$$n" -o `basename "$$n"`; then \
|
||||
if ! curl --fail -L -o `basename "$$n"` $(SOURCES_CURL_OPTS) "$$n"; then \
|
||||
echo "Failed to download $$n"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
@@ -260,7 +263,7 @@ sources:
|
||||
for b in $$latest_builds; do \
|
||||
url="$(DOWNLOAD_MIRROR)/releases/$$b/clear/source/package-sources"; \
|
||||
echo "Checking for source files in build $$b ..."; \
|
||||
if grep -q "$$nvr" <(curl -s -f -L $$url); then \
|
||||
if grep -q "$$nvr" <(curl -s -f -L $(MIRROR_CURL_OPTS) $$url); then \
|
||||
$(call fetch-from-srpm,$$b); \
|
||||
if [ $$? -eq 0 ]; then \
|
||||
echo "Source files retrieved from build $$b"; \
|
||||
@@ -283,8 +286,10 @@ koji: prekoji-checks kojidef
|
||||
@if ! git branch | grep -q -E '^\* master'; then \
|
||||
echo "Error: Must be on the master branch to submit to koji" >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if git rev-parse --verify --quiet origin/master > /dev/null; then \
|
||||
git pull --rebase; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git tag $(SRPMVERS)
|
||||
git push origin master refs/tags/$(SRPMVERS)
|
||||
$(KOJI_CMD) build $$KOJI_NOWAIT $(KOJI_TAG) $(PKG_BASE_URL)/$(PKG_NAME)?#$(SRPMVERS)
|
||||
@@ -388,15 +393,17 @@ install:
|
||||
|
||||
#help generateupstream: Run this rule to create or update the 'upstream' file
|
||||
#help by downloading the upstream source tarballs listed in the spec file and
|
||||
#help calculating their hashes. Autospec performs this step automatically, so ignore
|
||||
#help it for packages managed with autospec.
|
||||
#help calculating their hashes. Autospec performs this step automatically, so
|
||||
#help ignore it for packages managed with autospec. Additional curl options
|
||||
#help may be used for downloading the upstream source tarballs by defining the
|
||||
#help CURL_OPTS variable for this rule.
|
||||
generateupstream:
|
||||
@[ -e upstream ] && mv upstream upstream.bak; \
|
||||
urls=$$(rpmspec -D '_vendor clr' -P $(SPECFILE) | sed -n "s|^Source[0-9]*[[:blank:]]*:[[:blank:]]*\(..*://..*\)$$|\1|p"); \
|
||||
for url in $$urls; do \
|
||||
filename=$$(basename $$url); \
|
||||
if [ ! -e $$filename ]; then \
|
||||
if ! curl --fail -L -O $$url; then \
|
||||
if ! curl --fail -L -O $(CURL_OPTS) $$url; then \
|
||||
echo "Failed to download $$url"; \
|
||||
[ -e upstream.bak ] && mv --no-clobber upstream.bak upstream; \
|
||||
exit 1; \
|
||||
|
||||
+10
-4
@@ -26,6 +26,9 @@ CGIT_BASE_URL =
|
||||
# Location of upstream tarball cache used by 'make build', 'make sources', etc.
|
||||
SOURCES_URL =
|
||||
|
||||
# Additional curl options to use when downloading files from SOURCES_URL
|
||||
SOURCES_CURL_OPTS =
|
||||
|
||||
# Location where package repos are hosted.
|
||||
PKG_BASE_URL = https://github.com/clearlinux-pkgs
|
||||
|
||||
@@ -38,6 +41,9 @@ PROJ_PKGS = autospec clr-bundles common
|
||||
# Clear Linux download mirror to use
|
||||
DOWNLOAD_MIRROR = https://cdn.download.clearlinux.org
|
||||
|
||||
# Additional curl options to use when downloading files from DOWNLOAD_MIRROR
|
||||
MIRROR_CURL_OPTS =
|
||||
|
||||
# Location of release content from latest Clear Linux release
|
||||
LATEST_RELEASE = $(DOWNLOAD_MIRROR)/current
|
||||
|
||||
@@ -48,17 +54,17 @@ LATEST_SRPMS = $(LATEST_RELEASE)/source/SRPMS
|
||||
PACKAGES_FILE = $(TOPLVL)/projects/common/packages
|
||||
|
||||
# Configuration file for autospec.
|
||||
AUTOSPEC_CONF = $(TOPLVL)/projects/common/autospec.conf
|
||||
AUTOSPEC_CONF = $(TOPLVL)/projects/common/conf/autospec.conf
|
||||
|
||||
# Set this variable to any non-empty value to use the package mappings stored
|
||||
# in "pkg-mapping" for cloning/pulling package repos.
|
||||
USE_PACKAGE_MAPPING = yes
|
||||
|
||||
# Package manager config file. Default to the in-tree copy.
|
||||
PM_CONF = $(TOPLVL)/projects/common/image-creator/yum.conf
|
||||
# Package manager config file. Default to the in-tree copy of dnf.conf.
|
||||
PM_CONF = $(TOPLVL)/projects/common/conf/dnf.conf
|
||||
|
||||
# Mock configuration file. Default to the in-tree copy.
|
||||
MOCK_CONF = $(TOPLVL)/projects/common/koji-client-files/clear.cfg
|
||||
MOCK_CONF = $(TOPLVL)/projects/common/conf/clear.cfg
|
||||
|
||||
|
||||
# Include any site local configuration variables. These variables may override
|
||||
|
||||
+8
-2
@@ -10,6 +10,7 @@ include $(TOPLVL)/projects/common/Makefile.shared
|
||||
SHELL = /bin/bash
|
||||
|
||||
PKGS = $(shell cat $(PACKAGES_FILE))
|
||||
PKGS_LOCAL = $(sort $(filter ${PKGS},$(subst packages/,,$(wildcard packages/*))))
|
||||
|
||||
proj_PKGS = $(addprefix proj_,$(PROJ_PKGS))
|
||||
clone_PKGS = $(addprefix clone_,$(PKGS))
|
||||
@@ -64,7 +65,7 @@ cvecheck:
|
||||
#help of merge commits, while displaying any changes since your last pull. It is
|
||||
#help silent if there are no changes.
|
||||
.PHONY: pull ${PULL_PKGS}
|
||||
PULL_PKGS:= $(addprefix PULL_projects/,$(PROJ_PKGS)) $(addprefix PULL_packages/,$(PKGS))
|
||||
PULL_PKGS:= $(addprefix PULL_projects/,$(PROJ_PKGS)) $(addprefix PULL_packages/,${PKGS_LOCAL})
|
||||
${PULL_PKGS}:
|
||||
@p=$(patsubst PULL_%,%,$@) ; \
|
||||
if [ ! -d "$$p/.git" ]; then echo "Nothing to pull for $$p - $$p/.git missing"; exit 0; fi; \
|
||||
@@ -191,12 +192,16 @@ provides:
|
||||
|
||||
#help autospecnew: Creates a new autospec package with for a given URL=$(URL)
|
||||
#help with NAME=$(NAME). Several files used by autospec will be created in the
|
||||
#help process. For more information about autospec, see the project page on Github https://github.com/clearlinux/autospec
|
||||
#help process.
|
||||
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options
|
||||
#help to autospec.
|
||||
#help For more information about autospec, see the project page on Github https://github.com/clearlinux/autospec
|
||||
autospecnew: localreponotice
|
||||
@if [ -z $(NAME) ] || [ -z $(URL) ]; then \
|
||||
echo "Please specify NAME and URL. The ARCHIVES variable is optional."; \
|
||||
exit 1; \
|
||||
fi
|
||||
-$(MAKE) clone_$(NAME)
|
||||
@if [ ! -d $(TOPLVL)/packages/$(NAME)/.git ]; then \
|
||||
echo "no remote repository found, creating new package repository and running autospec"; \
|
||||
mkdir -p $(TOPLVL)/packages/$(NAME); \
|
||||
@@ -215,6 +220,7 @@ autospecnew: localreponotice
|
||||
--name $(NAME) \
|
||||
--archives $(ARCHIVES) \
|
||||
--mock-config $(MOCK_CONFIG_VAL) \
|
||||
--mock-opts "$(MOCK_OPTS)" \
|
||||
$${SETVERSION:+ --version $${SETVERSION}} \
|
||||
${NON_INTERACTIVE} ${SKIP_GIT} ${CLEANUP} \
|
||||
$(URL); \
|
||||
|
||||
@@ -31,43 +31,13 @@ $ ./user-setup.sh
|
||||
After the script completes, make sure to logout and login again to complete the
|
||||
setup process.
|
||||
|
||||
The script either accepts no options, or all (3) options in case you are
|
||||
configuring the Koji CLI for remote building on a Koji server. The options are
|
||||
documented in the script's `--help` output.
|
||||
The script accepts several options, or no options at all. The options are
|
||||
documented in the script's `--help` output. Note that if you are supplying any
|
||||
of the three Koji cert options (`-k`, `-s`, or `-c`), the other two options
|
||||
must be supplied as well.
|
||||
|
||||
### Manual setup
|
||||
|
||||
On your Clear Linux system, create a workspace for Clear Linux development
|
||||
work:
|
||||
|
||||
```
|
||||
$ mkdir clearlinux
|
||||
```
|
||||
|
||||
Clone this repo into a `projects` directory within the workspace:
|
||||
|
||||
```
|
||||
$ cd clearlinux
|
||||
$ mkdir projects
|
||||
$ git clone https://github.com/clearlinux/common projects/common
|
||||
```
|
||||
|
||||
Create the toplevel tooling Makefile:
|
||||
|
||||
```
|
||||
$ ln -s projects/common/Makefile.toplevel Makefile
|
||||
```
|
||||
|
||||
Clone all Clear Linux package and project repositories:
|
||||
|
||||
```
|
||||
$ make clone
|
||||
```
|
||||
|
||||
Note: You can clone the repos in parallel by using make's `-j` option.
|
||||
|
||||
At this point, the `packages` directory will contain all Clear Linux package
|
||||
repos, and `projects` will contain common, clr-bundles, and autospec repos.
|
||||
If you do not wish to run the user-setup script, see the "Manual setup" section
|
||||
below for hints about how to initialize the tooling workspace.
|
||||
|
||||
## Example usage
|
||||
|
||||
@@ -141,3 +111,66 @@ package, a `make bump` command is available for this purpose.
|
||||
$ make bump
|
||||
$ make build
|
||||
```
|
||||
|
||||
## Other topics
|
||||
|
||||
### Customizing the mock config
|
||||
|
||||
In the past, the various make commands that call `mock` required a mock config
|
||||
installed at `/etc/mock/clear.cfg`. However, at present, the commands will
|
||||
instead use the mock config within this repo (`conf/clear.cfg`).
|
||||
|
||||
If you wish to use a custom mock config, you must override the `MOCK_CONF`
|
||||
variable to specify a different value to pass to mock's `-r` option. The value
|
||||
is either a full path that ends with `.cfg`, or a config NAME installed at
|
||||
`/etc/mock/<NAME>.cfg`. You can override the `MOCK_CONF` config variable by
|
||||
redefining it in `Makefile.config.site_local`, which must reside at the
|
||||
toplevel directory in this repo.
|
||||
|
||||
For example, to retain the old behavior of mock using `/etc/mock/clear.cfg`,
|
||||
add this line to `Makefile.config.site_local`:
|
||||
|
||||
```
|
||||
MOCK_CONF = /etc/mock/clear.cfg
|
||||
```
|
||||
|
||||
If `Makefile.config.site_local` doesn't exist already, create it.
|
||||
|
||||
### Manual setup
|
||||
|
||||
If you did not run the user-setup script (see "Automated setup" section above),
|
||||
you will want to set up the developer tooling workspace manually. This section
|
||||
provides general documentation for the manual setup process, and it is not
|
||||
meant to be exhaustive.
|
||||
|
||||
On your Clear Linux system, create a workspace for Clear Linux development
|
||||
work:
|
||||
|
||||
```
|
||||
$ mkdir clearlinux
|
||||
```
|
||||
|
||||
Clone this repo into a `projects` directory within the workspace:
|
||||
|
||||
```
|
||||
$ cd clearlinux
|
||||
$ mkdir projects
|
||||
$ git clone https://github.com/clearlinux/common projects/common
|
||||
```
|
||||
|
||||
Create the toplevel tooling Makefile:
|
||||
|
||||
```
|
||||
$ ln -s projects/common/Makefile.toplevel Makefile
|
||||
```
|
||||
|
||||
Clone all Clear Linux package and project repositories:
|
||||
|
||||
```
|
||||
$ make clone
|
||||
```
|
||||
|
||||
Note: You can clone the repos in parallel by using make's `-j` option.
|
||||
|
||||
At this point, the `packages` directory will contain all Clear Linux package
|
||||
repos, and `projects` will contain common, clr-bundles, and autospec repos.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Configuration files
|
||||
|
||||
This directory contains various configuration files used by the developer
|
||||
tooling framework.
|
||||
|
||||
Unless otherwise noted in the config file documentation below, the config files
|
||||
can be modified with custom, site-local changes by modifying a variable in
|
||||
`Makefile.config.site_local` to point to a location of your choice (e.g.
|
||||
somewhere in `/etc`). The framework will then read the config file from the
|
||||
location you have specified instead, so copy the in-tree copy to that location
|
||||
as a starting point if you need to.
|
||||
|
||||
* `autospec.conf`: default Autospec configuration file used by `make autospec`
|
||||
and `make autospecnew`. All configuration is commented out by default, so
|
||||
default Autospec settings are used. Config variable: `AUTOSPEC_CONF`
|
||||
|
||||
* `clear.cfg`: default Mock configuration file used by various targets that
|
||||
call out to Mock. Config variable: `MOCK_CONF`
|
||||
|
||||
* `dnf.conf`: DNF conf for use as the package manager configuration file, made
|
||||
available for the framework's local repo support. Config variable: `PM_CONF`
|
||||
|
||||
* `yum.conf`: YUM conf for use as the package manager configuration file, made
|
||||
available for the framework's local repo support. Config variable: `PM_CONF`
|
||||
|
||||
* `koji.conf`: template Koji configuration file. It is installed by
|
||||
`user-setup.sh` to `/etc/koji.conf`, and the in-tree copy is not used. If you
|
||||
are using Koji with the framework, you will need to modify `/etc/koji.conf`
|
||||
according to how the Koji instance is set up for your environment. Configuring
|
||||
the installation location via `Makefile.config.site_local` is not possible at
|
||||
the moment but is a planned feature.
|
||||
@@ -18,6 +18,6 @@
|
||||
# an absolute path or a path relative to this autospec.conf.
|
||||
#packages_file =
|
||||
|
||||
# Path to yum config, used for generating whatrequires. It can be an absolute
|
||||
# Path to dnf/yum config, used for generating whatrequires. It can be an absolute
|
||||
# path or a path relative to this autospec.conf.
|
||||
#yum_conf =
|
||||
@@ -10,13 +10,14 @@ config_opts['releasever'] = 'clear'
|
||||
config_opts['package_manager'] = 'dnf'
|
||||
|
||||
|
||||
config_opts['yum.conf'] = """
|
||||
config_opts['dnf.conf'] = """
|
||||
|
||||
[main]
|
||||
cachedir=/var/cache/yum
|
||||
cachedir=/var/cache/dnf
|
||||
keepcache=1
|
||||
debuglevel=1
|
||||
reposdir=/dev/null
|
||||
logfile=/var/log/yum.log
|
||||
logfile=/var/log/dnf.log
|
||||
retries=20
|
||||
obsoletes=1
|
||||
gpgcheck=0
|
||||
@@ -0,0 +1,24 @@
|
||||
[main]
|
||||
keepcache=1
|
||||
debuglevel=1
|
||||
logfile=/var/log/dnf.log
|
||||
exactarch=1
|
||||
obsoletes=1
|
||||
gpgcheck=0
|
||||
plugins=0
|
||||
retries=10
|
||||
installonly_limit=3
|
||||
reposdir=/root/mash
|
||||
|
||||
[clear]
|
||||
name=Clear
|
||||
baseurl=https://cdn.download.clearlinux.org/current/x86_64/os/
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
|
||||
[clear-source]
|
||||
name=Clear sources
|
||||
failovermethod=priority
|
||||
baseurl=https://cdn.download.clearlinux.org/current/source/SRPMS/
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
@@ -7,6 +7,8 @@ FreeRDP
|
||||
GConf
|
||||
Jinja2
|
||||
Keras
|
||||
Keras_Applications
|
||||
Keras_Preprocessing
|
||||
LS_COLORS
|
||||
LVM2
|
||||
LibRaw
|
||||
@@ -25,6 +27,7 @@ OpenSP
|
||||
Paste
|
||||
PasteDeploy
|
||||
Pillow
|
||||
PyMySQL
|
||||
PyWavelets
|
||||
PyYAML
|
||||
Pygments
|
||||
@@ -222,9 +225,11 @@ R-flexmix
|
||||
R-forcats
|
||||
R-foreach
|
||||
R-formatR
|
||||
R-fossil
|
||||
R-fpc
|
||||
R-futile.logger
|
||||
R-futile.options
|
||||
R-future
|
||||
R-gam
|
||||
R-gamm4
|
||||
R-gbm
|
||||
@@ -239,6 +244,7 @@ R-ggplot2movies
|
||||
R-ggridges
|
||||
R-git2r
|
||||
R-glmnet
|
||||
R-globals
|
||||
R-glue
|
||||
R-gmodels
|
||||
R-gmp
|
||||
@@ -277,6 +283,7 @@ R-labelled
|
||||
R-laeken
|
||||
R-lambda.r
|
||||
R-lars
|
||||
R-later
|
||||
R-latticeExtra
|
||||
R-lava
|
||||
R-lazyeval
|
||||
@@ -285,6 +292,7 @@ R-leaflet
|
||||
R-leaps
|
||||
R-lfe
|
||||
R-libcoin
|
||||
R-listenv
|
||||
R-lle
|
||||
R-lme4
|
||||
R-lmtest
|
||||
@@ -374,6 +382,7 @@ R-processx
|
||||
R-prodlim
|
||||
R-profileModel
|
||||
R-progress
|
||||
R-promises
|
||||
R-proto
|
||||
R-proxy
|
||||
R-pryr
|
||||
@@ -432,6 +441,7 @@ R-setRNG
|
||||
R-sfsmisc
|
||||
R-sgeostat
|
||||
R-shape
|
||||
R-shapefiles
|
||||
R-shiny
|
||||
R-shinyjs
|
||||
R-shinystan
|
||||
@@ -476,6 +486,7 @@ R-tidyr
|
||||
R-tidyselect
|
||||
R-tidyverse
|
||||
R-timeDate
|
||||
R-tinytex
|
||||
R-tis
|
||||
R-tm
|
||||
R-topicmodels
|
||||
@@ -500,6 +511,7 @@ R-xtable
|
||||
R-xts
|
||||
R-yaml
|
||||
R-zCompositions
|
||||
R-zip
|
||||
R-zoo
|
||||
Remmina
|
||||
SDL
|
||||
@@ -536,7 +548,6 @@ accountsservice
|
||||
acl
|
||||
acme
|
||||
acpica-unix2
|
||||
acrn-devicemodel
|
||||
acrn-hypervisor
|
||||
adwaita-icon-theme
|
||||
aeon
|
||||
@@ -606,7 +617,6 @@ bcrypt
|
||||
bdftopcf
|
||||
beautifulsoup4
|
||||
beignet
|
||||
bigreqsproto
|
||||
bind-utils
|
||||
binutils
|
||||
bison
|
||||
@@ -655,6 +665,8 @@ cgit
|
||||
chardet
|
||||
check
|
||||
cheese
|
||||
cheroot
|
||||
cherrypy
|
||||
chrome-gnome-shell
|
||||
chrony
|
||||
chrpath
|
||||
@@ -701,6 +713,7 @@ colord
|
||||
colord-gtk
|
||||
comedilib
|
||||
compat-SDL2-soname1
|
||||
compat-cryptsetup-soname4
|
||||
compat-efivar-soname0
|
||||
compat-fuse-soname2
|
||||
compat-gegl
|
||||
@@ -720,7 +733,6 @@ compat-opencv-soname33
|
||||
compat-protobuf-soname14
|
||||
compat-readline
|
||||
component
|
||||
compositeproto
|
||||
compute-image-packages
|
||||
configobj
|
||||
configparser
|
||||
@@ -729,6 +741,7 @@ connect-proxy
|
||||
connman
|
||||
connman-gtk
|
||||
conntrack-tools
|
||||
console-autostart
|
||||
containerd
|
||||
contextlib2
|
||||
coreutils
|
||||
@@ -755,8 +768,8 @@ cups-filters
|
||||
cups-pk-helper
|
||||
curl
|
||||
cve-check-tool
|
||||
cxxfilt
|
||||
cycler
|
||||
damageproto
|
||||
dapl
|
||||
darktable
|
||||
dask
|
||||
@@ -764,6 +777,7 @@ db
|
||||
dbus
|
||||
dbus-glib
|
||||
dconf
|
||||
dconf-editor
|
||||
deap
|
||||
decorator
|
||||
defusedxml
|
||||
@@ -777,9 +791,9 @@ diffoscope
|
||||
diffstat
|
||||
diffutils
|
||||
dist-pam-configs
|
||||
distro
|
||||
dmenu
|
||||
dmidecode
|
||||
dmxproto
|
||||
dnf
|
||||
dnf-plugins-core
|
||||
dnsmasq
|
||||
@@ -797,10 +811,9 @@ double-conversion
|
||||
doxygen
|
||||
dpdk
|
||||
dracut
|
||||
dri2proto
|
||||
dri3proto
|
||||
dstat
|
||||
dtc
|
||||
dyskctl
|
||||
e2fsprogs
|
||||
ebtables
|
||||
ecdsa
|
||||
@@ -846,7 +859,6 @@ findutils
|
||||
fio
|
||||
firefox
|
||||
fish
|
||||
fixesproto
|
||||
fixtures
|
||||
flac
|
||||
flake8
|
||||
@@ -862,7 +874,6 @@ font-adobe-75dpi
|
||||
font-bitstream-type1
|
||||
font-util
|
||||
fontconfig
|
||||
fontsproto
|
||||
freeglut
|
||||
freeipmi
|
||||
freetype
|
||||
@@ -872,6 +883,8 @@ funcsigs
|
||||
functools32
|
||||
fuse
|
||||
futures
|
||||
fwupd
|
||||
fwupdate
|
||||
garcon
|
||||
gast
|
||||
gawk
|
||||
@@ -897,6 +910,7 @@ gevent
|
||||
gexiv2
|
||||
gfbgraph
|
||||
gflags
|
||||
gftp
|
||||
ghostscript
|
||||
gimp
|
||||
git
|
||||
@@ -908,9 +922,9 @@ glib
|
||||
glib-networking
|
||||
glibc
|
||||
glibmm
|
||||
glmark2
|
||||
global
|
||||
glog
|
||||
glproto
|
||||
glslang
|
||||
glu
|
||||
glusterfs
|
||||
@@ -1035,6 +1049,7 @@ i2c-tools
|
||||
i3
|
||||
i3lock
|
||||
i3status
|
||||
iasimage
|
||||
ibus
|
||||
icalendar
|
||||
icdiff
|
||||
@@ -1046,10 +1061,12 @@ imagesize
|
||||
imapfilter
|
||||
indent
|
||||
infiniband-diags
|
||||
influxdb
|
||||
iniparse
|
||||
init-rdahead
|
||||
inotify-tools
|
||||
inputproto
|
||||
intel-gpu-tools
|
||||
intel-hybrid-driver
|
||||
intltool
|
||||
invm-frameworks
|
||||
ioping
|
||||
@@ -1102,8 +1119,12 @@ jupyter_core
|
||||
jupyterlab
|
||||
jupyterlab_launcher
|
||||
kafka-dep
|
||||
kata-image
|
||||
kata-proxy
|
||||
kata-qemu-lite
|
||||
kata-runtime
|
||||
kata-shim
|
||||
kbd
|
||||
kbproto
|
||||
kernel-install
|
||||
kexec-tools
|
||||
keyring
|
||||
@@ -1188,6 +1209,7 @@ libgee
|
||||
libgepub
|
||||
libgfortran-avx
|
||||
libgfortran-compat-soname3
|
||||
libgfortran-compat-soname4
|
||||
libgit2
|
||||
libglade
|
||||
libgnome-keyring
|
||||
@@ -1207,6 +1229,7 @@ libisofs
|
||||
libjpeg-turbo
|
||||
libjpeg-turbo-soname8
|
||||
libksba
|
||||
libmbim
|
||||
libmediaart
|
||||
libmnl
|
||||
libmspack
|
||||
@@ -1232,6 +1255,7 @@ libpipeline
|
||||
libpng
|
||||
libpthread-stubs
|
||||
libpwquality
|
||||
libqmi
|
||||
librepo
|
||||
librsvg
|
||||
librtlsdr
|
||||
@@ -1240,6 +1264,7 @@ libsass
|
||||
libseccomp
|
||||
libsecret
|
||||
libsigc++
|
||||
libsmbios
|
||||
libsmi
|
||||
libsndfile
|
||||
libsolv
|
||||
@@ -1259,6 +1284,7 @@ libunistring
|
||||
libunwind
|
||||
libusb
|
||||
libuser
|
||||
libuv
|
||||
libva
|
||||
libva-intel-driver
|
||||
libva-utils
|
||||
@@ -1282,7 +1308,9 @@ libxml2-legacy
|
||||
libxshmfence
|
||||
libxslt
|
||||
libyami
|
||||
libyami-utils
|
||||
libzip
|
||||
libzmq
|
||||
linecache2
|
||||
links
|
||||
linux
|
||||
@@ -1293,6 +1321,7 @@ linux-gce
|
||||
linux-hyperv
|
||||
linux-hyperv-lts
|
||||
linux-hyperv-mini
|
||||
linux-kata
|
||||
linux-kvm
|
||||
linux-libc-headers
|
||||
linux-lts
|
||||
@@ -1329,13 +1358,17 @@ mc
|
||||
mccabe
|
||||
mcelog
|
||||
mdadm
|
||||
meld
|
||||
memkind
|
||||
memshrinker
|
||||
mesa
|
||||
mesa-demos
|
||||
meson
|
||||
metacity
|
||||
metrics-discovery
|
||||
micro-config-drive
|
||||
micro-config-drive-aws
|
||||
micro-config-drive-oci
|
||||
mido
|
||||
minetest
|
||||
minetest_game
|
||||
@@ -1345,9 +1378,12 @@ mixer-tools
|
||||
mkfontdir
|
||||
mkfontscale
|
||||
mkosi
|
||||
mobile-broadband-provider-info
|
||||
mock
|
||||
mod_wsgi
|
||||
moka-icon-theme
|
||||
more-itertools
|
||||
moreutils
|
||||
mosh
|
||||
motd-update
|
||||
motif
|
||||
@@ -1357,6 +1393,7 @@ mozjs52
|
||||
mpc
|
||||
mpfr
|
||||
mpg123
|
||||
mpi4py
|
||||
msgpack-python
|
||||
msmtp
|
||||
msr-tools
|
||||
@@ -1401,6 +1438,7 @@ ninja
|
||||
nlopt
|
||||
nodejs
|
||||
nose
|
||||
nose-cov
|
||||
nose-parameterized
|
||||
nosync
|
||||
notebook
|
||||
@@ -1419,7 +1457,9 @@ numba
|
||||
numpy
|
||||
numpydoc
|
||||
nvme-cli
|
||||
oath-toolkit
|
||||
oauth2client
|
||||
ocaml
|
||||
ocl-icd
|
||||
offlineimap
|
||||
olefile
|
||||
@@ -1471,6 +1511,7 @@ patch
|
||||
patchutils
|
||||
pavucontrol
|
||||
pbr
|
||||
pbr-legacy
|
||||
pbzip2
|
||||
pciutils
|
||||
pcre
|
||||
@@ -1567,6 +1608,7 @@ perl-Test-NoWarnings
|
||||
perl-Test-Output
|
||||
perl-Test-Pod
|
||||
perl-Test-Requires
|
||||
perl-Test-RequiresInternet
|
||||
perl-Test-Simple
|
||||
perl-Test-Taint
|
||||
perl-Test-Warn
|
||||
@@ -1601,6 +1643,7 @@ pidgin-sipe
|
||||
pigz
|
||||
pinentry
|
||||
pip
|
||||
pip-legacy
|
||||
pixman
|
||||
pkcs11-helper
|
||||
pkg-config
|
||||
@@ -1612,11 +1655,11 @@ poppler
|
||||
poppler-data
|
||||
popt
|
||||
portaudio
|
||||
portend
|
||||
posix_ipc
|
||||
postgresql
|
||||
powerline-fonts
|
||||
powertop
|
||||
presentproto
|
||||
pretend
|
||||
prettytable
|
||||
proc-macro2
|
||||
@@ -1667,6 +1710,7 @@ python-augeas
|
||||
python-dateutil
|
||||
python-future
|
||||
python-gflags
|
||||
python-kconfiglib
|
||||
python-krbV
|
||||
python-magic
|
||||
python-memcached
|
||||
@@ -1676,6 +1720,7 @@ python-multilib
|
||||
python-pkgconfig
|
||||
python-pocketlint
|
||||
python-polib
|
||||
python-rpm-legacypython
|
||||
python-subunit
|
||||
python-systemd
|
||||
python-tappy
|
||||
@@ -1722,17 +1767,14 @@ qtxmlpatterns
|
||||
quagga
|
||||
quilt
|
||||
ragel
|
||||
randrproto
|
||||
rdma-core
|
||||
re2c
|
||||
readline
|
||||
recordproto
|
||||
redis
|
||||
redis-native
|
||||
redsocks
|
||||
renderproto
|
||||
requests
|
||||
resourceproto
|
||||
requests-mock
|
||||
rest
|
||||
retry_decorator
|
||||
retype
|
||||
@@ -1743,6 +1785,7 @@ rpm
|
||||
rr
|
||||
rsa
|
||||
rsync
|
||||
rt-tests
|
||||
ruby
|
||||
runc
|
||||
rust-std32
|
||||
@@ -1765,7 +1808,6 @@ scipy
|
||||
scons
|
||||
screen
|
||||
scripttest
|
||||
scrnsaverproto
|
||||
seaborn
|
||||
seahorse
|
||||
secretstorage
|
||||
@@ -1774,12 +1816,15 @@ serf
|
||||
setproctitle
|
||||
setserial
|
||||
setuptools
|
||||
setuptools-legacy
|
||||
setuptools_scm
|
||||
setuptools_scm_git_archive
|
||||
shadow
|
||||
shared-mime-info
|
||||
sharutils
|
||||
shim
|
||||
siege
|
||||
simg-tools
|
||||
simple-scan
|
||||
simplegeneric
|
||||
simplejson
|
||||
@@ -1810,11 +1855,13 @@ spice-protocol
|
||||
spyder-notebook
|
||||
sqlite-autoconf
|
||||
sqlparse
|
||||
squashfs-tools
|
||||
sshfs
|
||||
stack
|
||||
startup-notification
|
||||
stow
|
||||
strace
|
||||
stress-ng
|
||||
subunit
|
||||
subversion
|
||||
sudo
|
||||
@@ -1840,6 +1887,7 @@ tcpdump
|
||||
telemetrics-client
|
||||
telepathy-glib
|
||||
telepathy-logger
|
||||
tempora
|
||||
tensorboard
|
||||
tensorflow
|
||||
termcolor
|
||||
@@ -1851,6 +1899,7 @@ testresources
|
||||
testscenarios
|
||||
testtools
|
||||
texinfo
|
||||
texlive
|
||||
tflearn
|
||||
thermal_daemon
|
||||
thin-provisioning-tools
|
||||
@@ -1886,6 +1935,7 @@ uhttpmock
|
||||
unbundle
|
||||
unicode-xid
|
||||
unifdef
|
||||
unison
|
||||
unittest2
|
||||
unzip
|
||||
upower
|
||||
@@ -1904,7 +1954,6 @@ v4l-utils
|
||||
vala
|
||||
valgrind
|
||||
vcversioner
|
||||
videoproto
|
||||
vim
|
||||
vim-go
|
||||
vinagre
|
||||
@@ -1917,6 +1966,7 @@ volume_key
|
||||
vsqlite
|
||||
vte
|
||||
vulkan-sdk
|
||||
waffle
|
||||
waitress
|
||||
wayland
|
||||
wayland-protocols
|
||||
@@ -1953,7 +2003,6 @@ xcb-util-renderutil
|
||||
xcb-util-wm
|
||||
xcb-util-xrm
|
||||
xclip
|
||||
xcmiscproto
|
||||
xcursor-themes
|
||||
xcursorgen
|
||||
xdg-desktop-portal
|
||||
@@ -1961,7 +2010,6 @@ xdg-user-dirs
|
||||
xdg-user-dirs-gtk
|
||||
xdg-utils
|
||||
xemacs
|
||||
xextproto
|
||||
xf86-input-evdev
|
||||
xf86-input-libinput
|
||||
xf86-input-mouse
|
||||
@@ -1972,10 +2020,6 @@ xf86-video-ati
|
||||
xf86-video-fbdev
|
||||
xf86-video-nouveau
|
||||
xf86-video-vesa
|
||||
xf86bigfontproto
|
||||
xf86dgaproto
|
||||
xf86driproto
|
||||
xf86vidmodeproto
|
||||
xfburn
|
||||
xfce4-appfinder
|
||||
xfce4-dev-tools
|
||||
@@ -1991,7 +2035,6 @@ xfdesktop
|
||||
xfsprogs
|
||||
xfwm4
|
||||
xhost
|
||||
xineramaproto
|
||||
xinit
|
||||
xkbcomp
|
||||
xkeyboard-config
|
||||
@@ -2000,8 +2043,8 @@ xmlsec1
|
||||
xmlstarlet
|
||||
xmlto
|
||||
xorg-server
|
||||
xorgproto
|
||||
xorriso
|
||||
xproto
|
||||
xrandr
|
||||
xrdb
|
||||
xrdp
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ if [ "$#" -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [ ! -e /etc/yum.conf ]; then
|
||||
echo "Error: yum.conf is missing. Please copy projects/common/image-creator/yum.conf to /etc"
|
||||
echo "Error: yum.conf is missing. Please copy projects/common/conf/yum.conf to /etc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Regular → Executable
+1
@@ -54,4 +54,5 @@ qemu-system-x86_64 \
|
||||
-drive file="$IMAGE",if=virtio,aio=threads,format=raw \
|
||||
-netdev user,id=mynet0,hostfwd=tcp::${VMN}0022-:22,hostfwd=tcp::${VMN}2375-:2375 \
|
||||
-device virtio-net-pci,netdev=mynet0 \
|
||||
-device virtio-rng-pci \
|
||||
-debugcon file:debug.log -global isa-debugcon.iobase=0x402 $@
|
||||
+133
-100
@@ -1,102 +1,131 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT=$(/usr/bin/basename $0)
|
||||
PEM=""
|
||||
SERVERCA=""
|
||||
CLIENTCA=""
|
||||
WORKSPACE="clearlinux"
|
||||
PACKAGE_REPOS=
|
||||
|
||||
help() {
|
||||
printf "%s\n" >&2 "Usage: $SCRIPT [options]" \
|
||||
"" \
|
||||
"Options:" \
|
||||
"-k --client-cert PEM_FILE: Enable client user cert for koji configuration; requires a PEM file argument" \
|
||||
"-s --server-ca PEM_FILE: Enable server CA cert for koji configuration; requires a PEM file argument" \
|
||||
"-c --client-ca PEM_FILE: Enable client CA cert for koji configuration; requires a PEM file argument" \
|
||||
""
|
||||
printf "%s\n" >&2 "Usage: $SCRIPT [options]" \
|
||||
"" \
|
||||
"Options:" \
|
||||
"" \
|
||||
"-d --directory NAME: Set up workspace in the given directory." \
|
||||
"-a --clone-packages: Clone all package repos." \
|
||||
"-j --jobs [NUM]: Clone repos with NUM jobs. If NUM is not given, it is set to the available CPU count." \
|
||||
"" \
|
||||
"-k --client-cert PEM_FILE: Enable client user cert for koji configuration; requires a PEM file argument" \
|
||||
"-s --server-ca PEM_FILE: Enable server CA cert for koji configuration; requires a PEM file argument" \
|
||||
"-c --client-ca PEM_FILE: Enable client CA cert for koji configuration; requires a PEM file argument" \
|
||||
""
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "Error: $1\n" >&2
|
||||
help
|
||||
exit 1
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
"--help"|"-h")
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
"--client-cert"|"-k")
|
||||
shift
|
||||
PEM="$PWD/$1"
|
||||
;;
|
||||
"--server-ca"|"-s")
|
||||
shift
|
||||
SERVERCA="$PWD/$1"
|
||||
;;
|
||||
"--client-ca"|"-c")
|
||||
shift
|
||||
CLIENTCA="$PWD/$1"
|
||||
;;
|
||||
*)
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
case "$1" in
|
||||
"--help"|"-h")
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
"--client-cert"|"-k")
|
||||
shift
|
||||
PEM="$(realpath $1)"
|
||||
;;
|
||||
"--server-ca"|"-s")
|
||||
shift
|
||||
SERVERCA="$(realpath $1)"
|
||||
;;
|
||||
"--client-ca"|"-c")
|
||||
shift
|
||||
CLIENTCA="$(realpath $1)"
|
||||
;;
|
||||
"--jobs"|"-j")
|
||||
if echo "$2" | grep -qx "[1-9][0-9]*"; then
|
||||
shift
|
||||
JOBS="$1"
|
||||
elif [ -f /proc/cpuinfo ]; then
|
||||
JOBS=$(grep -Ec '^processor.*:.*[0-9]+$' /proc/cpuinfo)
|
||||
fi
|
||||
;;
|
||||
"--directory"|"-d")
|
||||
[ -z "$2" ] && error "Must supply a directory name to the -d option"
|
||||
[ "${2:0:1}" = "-" ] && error "Directory name cannot begin with \"-\""
|
||||
shift
|
||||
WORKSPACE="$1"
|
||||
;;
|
||||
"--clone-packages"|"-a")
|
||||
PACKAGE_REPOS=1
|
||||
;;
|
||||
*)
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
error() {
|
||||
echo -e "Error: $1\n" >&2
|
||||
help
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z "$PEM" ] && [ -z "$SERVERCA" ] && [ -z "$CLIENTCA" ]; then
|
||||
USE_KOJI=
|
||||
USE_KOJI=
|
||||
else
|
||||
if [ -z "$PEM" ] || [ -z "$SERVERCA" ] || [ -z "$CLIENTCA" ]; then
|
||||
error "Must specify all three command line options (or none)"
|
||||
fi
|
||||
if [ ! -f "$PEM" ]; then
|
||||
error "Missing koji client PEM key file"
|
||||
fi
|
||||
if [ ! -f "$SERVERCA" ]; then
|
||||
error "Missing koji server CA PEM file"
|
||||
fi
|
||||
if [ ! -f "$CLIENTCA" ]; then
|
||||
error "Missing koji client CA PEM file"
|
||||
fi
|
||||
USE_KOJI="yes"
|
||||
if [ -z "$PEM" ] || [ -z "$SERVERCA" ] || [ -z "$CLIENTCA" ]; then
|
||||
error "Must specify all three command line options (or none)"
|
||||
fi
|
||||
if [ ! -f "$PEM" ]; then
|
||||
error "Missing koji client PEM key file"
|
||||
fi
|
||||
if [ ! -f "$SERVERCA" ]; then
|
||||
error "Missing koji server CA PEM file"
|
||||
fi
|
||||
if [ ! -f "$CLIENTCA" ]; then
|
||||
error "Missing koji client CA PEM file"
|
||||
fi
|
||||
USE_KOJI="yes"
|
||||
fi
|
||||
|
||||
if [ -n "$JOBS" ]; then
|
||||
JOBS_ARG="-j $JOBS"
|
||||
fi
|
||||
|
||||
if [ -d "$WORKSPACE" ]; then
|
||||
error "Directory \"$WORKSPACE\" already exists. \
|
||||
Either remove this workspace, or use a different workspace name."
|
||||
fi
|
||||
|
||||
required_progs() {
|
||||
local bindir="/usr/bin"
|
||||
for f in git mock rpm rpmbuild ; do
|
||||
[ ! -x "${bindir}/${f}" ] && missing+="${f} "
|
||||
done
|
||||
[ "$PEM" ] && [ ! -x /usr/bin/koji ] && missing+="koji "
|
||||
if [ -n "$missing" ]; then
|
||||
echo "Install the following programs and re-run this script:" >&2
|
||||
echo $missing >&2
|
||||
echo 'All programs should be provided in the "os-clr-on-clr" bundle.' >&2
|
||||
exit 1
|
||||
fi
|
||||
local bindir="/usr/bin"
|
||||
for f in git mock rpm rpmbuild ; do
|
||||
[ ! -x "${bindir}/${f}" ] && missing+="${f} "
|
||||
done
|
||||
[ "$PEM" ] && [ ! -x /usr/bin/koji ] && missing+="koji "
|
||||
if [ -n "$missing" ]; then
|
||||
echo "Install the following programs and re-run this script:" >&2
|
||||
echo $missing >&2
|
||||
echo 'All programs should be provided in the "os-clr-on-clr" bundle.' >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
required_progs
|
||||
|
||||
echo 'Initializing development workspace in "clearlinux" . . .'
|
||||
if [ -d "clearlinux" ]; then
|
||||
echo 'Directory "clearlinux" already exists in current directory.' >&2
|
||||
echo "Cannot initialize workspace." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Initializing development workspace in \"$WORKSPACE\" . . ."
|
||||
|
||||
mkdir clearlinux
|
||||
cd clearlinux
|
||||
mkdir "$WORKSPACE"
|
||||
cd "$WORKSPACE"
|
||||
|
||||
echo "Setting up common repo . . ."
|
||||
mkdir projects
|
||||
git clone https://github.com/clearlinux/common projects/common
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to clone common repo." >&2
|
||||
exit 1
|
||||
echo "Failed to clone common repo." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Finish setup for packages/projects hierarchy
|
||||
@@ -105,48 +134,52 @@ mkdir -p packages/common
|
||||
ln -sf ../../projects/common/Makefile.common packages/common/Makefile.common
|
||||
|
||||
if [ "$USE_KOJI" ]; then
|
||||
echo "Setting up koji certs . . ."
|
||||
mkdir -p ~/.koji
|
||||
cp "$PEM" ~/.koji/client.crt
|
||||
cp "$CLIENTCA" ~/.koji/clientca.crt
|
||||
cp "$SERVERCA" ~/.koji/serverca.crt
|
||||
echo "Setting up koji certs . . ."
|
||||
mkdir -p ~/.koji
|
||||
cp "$PEM" ~/.koji/client.crt
|
||||
cp "$CLIENTCA" ~/.koji/clientca.crt
|
||||
cp "$SERVERCA" ~/.koji/serverca.crt
|
||||
|
||||
if [ ! -f /etc/koji.conf ]; then
|
||||
echo "Setting up koji config . . ."
|
||||
sudo cp projects/common/koji-client-files/koji.conf /etc
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/mock/clear.cfg ]; then
|
||||
echo "Setting up mock config . . ."
|
||||
sudo mkdir -p /etc/mock
|
||||
sudo cp projects/common/koji-client-files/clear.cfg /etc/mock
|
||||
if [ ! -f /etc/koji.conf ]; then
|
||||
echo "Setting up koji config . . ."
|
||||
sudo cp projects/common/conf/koji.conf /etc
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Adding user to kvm group . . ."
|
||||
sudo usermod -a -G kvm $USER
|
||||
|
||||
echo "Cloning special project repositories . . ."
|
||||
make clone-projects
|
||||
make ${JOBS_ARG} clone-projects
|
||||
|
||||
if [ -z "$NO_PACKAGE_REPOS" ]; then
|
||||
echo "Cloning all package repositories . . ."
|
||||
make clone-packages
|
||||
if [ -n "$PACKAGE_REPOS" ]; then
|
||||
echo "Cloning all package repositories . . ."
|
||||
make ${JOBS_ARG} clone-packages
|
||||
fi
|
||||
|
||||
echo "Creating mix workspace . . ."
|
||||
mkdir -p mix
|
||||
|
||||
if [ "$USE_KOJI" ]; then
|
||||
echo "Testing koji installation . . ."
|
||||
if koji moshimoshi; then
|
||||
echo -en "\n************************\n\n"
|
||||
echo "Koji installed and configured successfully"
|
||||
else
|
||||
echo -en "\n************************\n\n"
|
||||
echo "Error with koji installation or configuration" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Testing koji installation . . ."
|
||||
if koji moshimoshi; then
|
||||
echo -en "\n************************\n\n"
|
||||
echo "Koji installed and configured successfully"
|
||||
else
|
||||
echo -en "\n************************\n\n"
|
||||
echo "Error with koji installation or configuration" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -en "\n************************\n"
|
||||
|
||||
echo 'Workspace has been set up in the "clearlinux" directory'
|
||||
echo "Workspace has been set up in \"$WORKSPACE\""
|
||||
if [ -z "$PACKAGE_REPOS" ]; then
|
||||
echo "NOTE: To clone all package repos, run \"cd $WORKSPACE; make [-j NUM] clone-packages\""
|
||||
echo "NOTE: To clone a single package repo with NAME, run \"cd $WORKSPACE; make clone_NAME\""
|
||||
fi
|
||||
echo 'NOTE: logout and log back in to finalize the setup process'
|
||||
|
||||
|
||||
# vi: ft=sh sw=2 et sts=2
|
||||
|
||||
Reference in New Issue
Block a user