RPM packages build tool in a clean Mageia chroot environment for Mageia Linux distribution
Zeynep is a bash script which generates a chroot environment, installs basesystem, compresses it into a tar.xz archive for future uses. It can creates a chroot environment using its own generated tar.xz archive; copies source rpm package into chroot; installs build dependencies and creates rpm packages.
I tried to use "iurt" but could not find a guide enough to understand. I tried "aum" (perl version) and it was very useful. Unfortunately i needed some futures that aum does not have:
So, zeynep born.
First things first; never try to run zeynep as root! It will use "sudo" when required. If you don't want to type your sudo password every time needed; then add zeynep to your /etc/sudoers file; but this may also RISKY! See below how to configure /etc/sudoers.
zeynep [-g][options] [arguments] [-s] [srpm]
Examples:
Creating a chroot tarball for Mageia 4 with cache for a x86_64 system with user defined packages also installed:
zeynep -g -m 4 -a x86-64 -c $HOME/rpm/cache/x86_64 -p "wget vim task-kde"
Creating signed rpms from a srpm for Mageia 4 with cache for a x86_64 system using a distrib mirror and creating genhdlist without upload dir: (Created rpms will reside in $HOME/RPMS/x86_64 directory)
zeynep -SG -m 4 -t "$HOME/rpm/chroot-tarballs" -d http://ftp.linux.org.tr/mageia/distrib -a x86_64 -s $HOME/foo-1.0-1.mga4.src.rpm
Creating signed rpms from a srpm for Mageia 4 with cache for a x86_64 system using a distrib mirror and creating genhdlist with upload dir:
zeynep -SG -m 4 -t "$HOME/rpm/chroot-tarballs" -d http://ftp.linux.org.tr/mageia/distrib -a x86_64 -u $HOME/rpms -s $HOME/foo-1.0-1.mga4.src.rpm
Building x86_64 arch rpm packages for Mageia 4 without pre-created tarball usage:
zeynep -ZG -m 4 -d http://ftp.linux.org.tr/mageia/distrib -a x86_64 -s $HOME/foo-1.0-1.mga4.src.rpm
You should have at least autoconf and gettext-devel packages installed to build and install zeynep. Normally you should run
./autogen.sh
./configure
make
and as root
make install
Without any option specified zeynep will install in /usr directory. Please refer to the INSTALL file for installation steps and options.
Zeynep needs to rpm, urpmi, rpmbuild, sed and sudo be install to run. For localization support you should have gettext package installed. Also rpm-tidy and rpm-sign should be installed to clean older rpms and rpm signing features.
This may be harmful for your setup and YOU'VE BEEN WARNED!
You can configure your /etc/sudoers file in a way that you won't need to type your sudo password everytime needed. Add below lines at the end of your /etc/sudoers file. Note that you should use "visudo" command to do this:
your_username ALL=(root) NOPASSWD: /whare/zeynep_is_installed/zeynep
Due to "getopts" limitations, if you type an argument required option before non argument required option zeynep will likely to fail. For example:
zeynep -mZ 4 -s foo.src.rpm
You should notice that "Z" option follows "-m" option which requires an argument which is "4" here. Getopts parse these in a way that "Z" becomes argument for "-m" and this will result as mageia_version="Z" and of course zeynep will fail. So, do not use options like that. Altough this should work:
zeynep -Zm 4 -s foo.src.rpm
Atilla ÖNTAŞ
Please report any bugs you've found to https://github.com/tarakbumba/zeynep/issues/new