Difference between revisions of "Pidora SOP"
(→Composing Images) |
(→Mash Command Line Details) |
||
Line 113: | Line 113: | ||
</pre> | </pre> | ||
− | == Mash Command Line | + | == Mash Command Line Execution == |
+ | * /usr/local/bin/mashrun-pidora-18 | ||
= Composing Images = | = Composing Images = |
Revision as of 17:13, 9 April 2013
Intro
This page covers how one can manage the various needed parts of a complete release process. This includes the other SOP pages containing file configurations and/or quick command line references for the following procedures:
- Building packages
- Signing packages
- Creating repositories
- Composing images
Building Packages
Koji-Follow Configuration SOPs
How-To-Run
- ssh <your_username>@japan
- sudo kojiadmin
- screen -xr follow
- python ~/koji-follow.py ~/koji-follow.conf > ~/logs/kfo.log 2> ~/logs/kfe.log
Signing Packages
Sigul Configuration SOPs
- http://zenit.senecac.on.ca/wiki/index.php/Sigul_Signing_Server_Setup
- http://zenit.senecac.on.ca/wiki/index.php/Cdot_sigul_sop
- http://fedoraproject.org/wiki/Create_release_signing_key
Creating Repositories
Mash File Configuration Details
/etc/mash/pidora-18.mash
# mash config file [pidora-18] rpm_path = %(arch)s/os/Packages repodata_path = %(arch)s/os/ source_path = source/SRPMS debuginfo = True multilib = False multilib_method = devel tag = f18-rpfr inherit = True # Unsigned is temporary strict_keys = True #keys = 34E166FA, F8DF67E6, A82BA4B7, 069C8460, 97A1071F, E8E40FDE, 57BBCCBA, D22E77F2, 4EBFC273, 0B86274E, 6DF2196F, DF9B0AE9 keys = CE8D31E3 repoviewurl = http://download.fedoraproject.org/pub/fedora-secondary/development/18/%(arch)s/os/ repoviewtitle = "Fedora Branched - %(arch)s" arches = armhfp # armv6 doesn't have horsepower to make delta useful delta = False # Change distro_tags as fedora-release version gets bumped # The cpe URI should be fixed up distro_tags = cpe:/o:fedoraproject:fedora:18 rawhide hash_packages = True
/etc/mash/mash.conf
[defaults] configdir = /etc/mash buildhost = http://japan.proximity.on.ca/kojihub repodir = file:///mnt/koji use_sqlite = True use_repoview = False
/usr/local/bin/mashrun-pidora-18
#!/bin/bash # # mashrun-pidora18 :: Compose a Pidora 18 repository # DISTNAME=pidora RELEASE=18 # Default mash output dir is unique by dates (YYYYMMDD) BASEDIR=/mnt/koji/mash MASHDIR=${BASEDIR}/${DISTNAME}-${RELEASE}-$(date +%Y%m%d) # If there is already a compose output directory for today, # append -HHMMSS if [ -d ${MASHDIR} ] # If YYYYMMDD exists, add -HHMMSS then MASHDIR=${MASHDIR}-$(date +%H%M%S) fi mkdir -p ${MASHDIR} { exec 2>&1 echo "Composing to ${MASHDIR}..." time mash -o ${MASHDIR} ${DISTNAME}-${RELEASE} -f /usr/local/mash/comps-${DISTNAME}-${RELEASE}.xml.gz rm ${BASEDIR}/${DISTNAME}-${RELEASE}-latest ln -s ${MASHDIR} ${BASEDIR}/${DISTNAME}-${RELEASE}-latest echo echo "Warnings about unsigned packages are temporarily suppressed from email." echo "Refer to ${MASHDIR}/mash.log for warnings." }| cat -v | tee ${MASHDIR}/mash.log | fgrep -v '(signed with no key)' | mail -s "${DISTNAME}-${RELEASE} Mash Run" mashrun-alert # The 'cat -v' above is there to prevent an unprintable code from throwing off the # mail command.
Mash Command Line Execution
- /usr/local/bin/mashrun-pidora-18
Composing Images
Before you can attempt to run a compose you should check to make sure that the following packages are installed:
- anaconda
- lorax
SSH to the arm device you want to run the compose on. chroot into the armv6hl directory on the arm device.
- chroot /root/f17v6
cd into the livemedia directory or where ever your kickstart file is located.
- cd /livemedia
Run the provided Livemedia-Creator command provided below to start the compose process.
Example Kickstart File
http://scotland.proximity.on.ca/raspberrypi/test-releases/rpfr18v6/latest/pidora-18.ks
Example Livemedia-Creator Command
- livemedia-creator --make-disk --no-virt --image-only --keep-image --ks=rpfr-18.ks
- command details
-h, --help For more info on commands
--make-disk Build a disk image
--no-virt Use Anaconda's image install instead of virt-install
--image-only Exit after creating disk image.
--ks KS Kickstart file defining the install.
Example Post Script Execution
You may have more than one %post section, which can be useful for cases where some post-installation scripts need to be run in the chroot and others that need access outside the chroot.
%post section is required to be closed with a corresponding %end
Post Section Options
- command details
--nochroot
Allows you to specify commands that you would like to run outside of the chroot environment.
--interpreter /usr/bin/python
Allows you to specify a different scripting language, such as Python. Replace /usr/bin/python with the scripting language of your choice.
--erroronfail
If the post-installation script fails, this option will cause an error dialog to be displayed and will halt installation. The error message will direct you to where the cause of the failure is logged.
--log=
Example Post Installation Script "Creating/Modifying the fstab"
cat << EOF > /etc/fstab
LABEL="rootfs" / ext4 defaults,noatime 1 1
LABEL="boot" /boot vfat noauto,comment=systemd.automount 1 2
EOF