<commit_before># Fedora lx-brand Image Builder

This is a collection of scripts used for creating an LX-brand Fedora image.

## Requirements

In order to use these scripts you'll need:

- A Fedora running in a KVM virtual machine or bare metal (required for the `install` script) with git installed. Running `install` in a Fedora lx-brand zone is not supported. The major version of the Fedora machine you use to run the `install` script must be the same as the version you intend to install in the chroot directory (e.g., if you want to install Fedora 6, your host machine should also be Fedora 6)
- A SmartOS (or SDC headnode) install (required for the `create-lx-image` script)

## Usage

### Create a Fedora install tarball via the `install` script

On a Fedora or CentOS machine, do the following:

1. Clone this repo to your Fedora machine: `git clone https://github.com/joyent/fedora-lx-brand-image-builder`
2. Change to the repo directoru: `cd fedora-lx-brand-image-builder`
3. Run `./install -d <chroot> -m <mirror> -r <release package> -i <image name> -p <proper name> -u <image docs>` to install Fedora in a given directory. This will create a tarball of the installation in your working directory (named `<image name>-$YYMMDD.tar.gz`). See ./install -h for detailed usage.

### Create an lx brand image with the `create-lx-image` script

On a SmartOS in the global zone.

1. Clone this repo (if you have git installed) or download and upack it
2. Copy the tarball you created above to your SmartOS machine or SDC headnode and run `./create-lx-image -t /full/path/to/<image name>-<YYMMDD>.tar.gz` (substituting the name of your tar file). This will create the image file and manifest.
<commit_msg>Fedora only for build machine<commit_after># Fedora lx-brand Image Builder

This is a collection of scripts used for creating an LX-brand Fedora image.

## Requirements

In order to use these scripts you'll need:

- A Fedora running in a KVM virtual machine or bare metal (required for the `install` script) with git installed. Running `install` in a Fedora lx-brand zone is not supported. The major version of the Fedora machine you use to run the `install` script must be the same as the version you intend to install in the chroot directory (e.g., if you want to install Fedora 6, your host machine should also be Fedora 6)
- A SmartOS (or SDC headnode) install (required for the `create-lx-image` script)

## Usage

### Create a Fedora install tarball via the `install` script

On a Fedora machine, do the following:

1. Clone this repo to your Fedora machine: `git clone https://github.com/joyent/fedora-lx-brand-image-builder`
2. Change to the repo directoru: `cd fedora-lx-brand-image-builder`
3. Run `./install -d <chroot> -m <mirror> -r <release package> -i <image name> -p <proper name> -u <image docs>` to install Fedora in a given directory. This will create a tarball of the installation in your working directory (named `<image name>-$YYMMDD.tar.gz`). See ./install -h for detailed usage.

### Create an lx brand image with the `create-lx-image` script

On a SmartOS in the global zone.

1. Clone this repo (if you have git installed) or download and upack it
2. Copy the tarball you created above to your SmartOS machine or SDC headnode and run `./create-lx-image -t /full/path/to/<image name>-<YYMMDD>.tar.gz` (substituting the name of your tar file). This will create the image file and manifest.

{'fraction_non_alphanumeric': 0.08299240210403273, 'fraction_numerical': 0.004091174751607247, 'mean_word_length': 3.9680696661828736, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7668896', 'n_tokens_mistral': 1022, 'n_tokens_neox': 988, 'n_words': 526}