Name: common
Owner: Clear Linux* Project for Intel Architecture
Description: Developer tooling framework
Created: 2017-12-20 20:25:48.0
Updated: 2018-05-24 15:49:07.0
Pushed: 2018-05-24 15:49:05.0
Homepage: null
Size: 326
Language: Perl
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository includes scripts, configuration files, and makefiles that enable Clear Linux developers to manage, maintain, and validate changes to distro packages and projects that are maintained in git repositories. Development workflows are makefile-driven, and there is a particular focus on building Clear Linux packages.
os-clr-on-clr
bundle:upd bundle-add os-clr-on-clr
Download the user setup script and run it on your Clear Linux system as an unprivileged user.
rl -O https://raw.githubusercontent.com/clearlinux/common/master/user-setup.sh
mod +x user-setup.sh
user-setup.sh
After the script completes, make sure to logout and login again to complete the setup process.
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.
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.
In every repo cloned to the packages
tree, several make commands are
available for managing a given package. For example, you can build source,
binary, and debuginfo RPMs for a package by running make build
.
To build RPMs for the coreutils package, do the following:
packages/coreutils
ke build
The results of make build
are stored in the results
directory within the
repo.
Run make help
to see other make commands that are available to work with the
package.
Due to the frequent release cadence, you may wish to keep repos in the
workspace up-to-date with the most recent changes. To do so, run make pull
in
the toplevel directory of the workspace. Assuming your current working
directory is a package repo, do:
../..
ke pull
A make pull
will display the diffstat for each project and package repo with
changes since you last updated the workspace.
If new packages were added to the distro since the last update, clone the new
package repos by running make clone
.
Run make help
to see other make commands available to run at toplevel.
The toplevel makefile provides a make autospecnew
command that can
automatically generate an RPM package by using the autospec
tool. You must
define the URL
and NAME
variables for the command. URL
is a URL to the
package's upstream source tarball, and NAME
is the name of the package you
wish to create.
ke autospecnew URL="..." NAME="example-pkg"
Whether or not autospec successfully creates the package, a new package directory will be created to continue work on it. In the example below, a missing build dependency is added, and then autospec is re-run.
packages/example-pkg
ho missing-build-req >> buildreq_add
ke autospec
If you simply need to increment a package's release number and rebuild the
package, a make bump
command is available for this purpose.
ke bump
ke build
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 (koji-client-files/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
:
_CONF = /etc/mock/clear.cfg
If Makefile.config.site_local
doesn't exist already, create it.
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:
dir clearlinux
Clone this repo into a projects
directory within the workspace:
clearlinux
dir projects
t clone https://github.com/clearlinux/common projects/common
Create the toplevel tooling Makefile:
-s projects/common/Makefile.toplevel Makefile
Clone all Clear Linux package and project repositories:
ke 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.