Libremakepkg
Libremakepkg is an script which:
- Checks nonfree depends on PKGBUILD
- Bind mount ${SRCDEST} ${PKGDEST} ${SRCPKGDEST} ${WORKDIR}, and optionally copy etc/makepkg.conf etc/pacman.conf etc/mtab to the chroot (This steps is called buildenv in the script)
- Updates the chroot where you are building (option -u)
- Cleans the chroot so no package is configured automatically as an depends (option -c) and
- Finally it uses makechrootpkg to build the package.
The package will be put on ${PKGDEST}.
Contents
1 Usage
# pacman -Sy devtools
1.1 Which are libremakepkg options?
Libremakepkg will always have an updated list of options which can be listed using:
$ libremakepkg -h
1.2 Building with libremakepkg
For building with libremakepkg you should cd to the dir where the PKGBUILD is and run
$ cd /dir/with/PKGBUILD # libremakepkg [options]
If no option is passed to libremakepkg it will buildenv and build the package without updating or cleaning. This is useful if a previous build failed and you changed the PKGBUILD so that it will work this time.
2 Why Buildenv?
buildenv is meant for fullpkg to be able to add packages to a local repo and install them too.
buildenv is no longer necessary with the version in [libre-testing].
3 How is the cleaning done?
makechrootpkg has a cleaning option which rsync from a "root" chroot to a "copy" chroot and uses the "copy" chroot to build. When we were working at the mips port we created a script that tracks dependencies and builds them (fullpkg). We found out that rsync cleaning was slow and ineficient. So we designed a new cleaning method that uses pacman and a list of packages in a clean system.
The cleaning method in libremakepkg:
- copy the list of packages to the chroot (/etc/libretools.d/cleansystem
- uses comm to compare packages installed on the system and in "cleansystem"
- removes all packages not in "cleansystem".
4 I'm having problems with libremakepkg
Report an issue to the bug tracker. Use [libretools] at the beggining of the title for the issue.