Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. The syntax for pkg_patch usage is: <code> usage: ./pkg_patch -c [-b] package_file_1 package_file_2 patch_file ./pkg_patch -a patch_file ./pkg_patch -m [-b] [-r url_repo] package_dir_1 package_dir_2 patch_dir ./pkg_patch -u [url] </code> The target usage scenario for the end-user is to use the "-u" flag to pkg_patch in order to update the currently running system. ===== Creating the patch file ===== To create the patch file ''%%apache-2.2.13-2.2.15_1.tbz%%'' (compressed, bsdiff-powered): <code> pkg_patch -cb apache-2.2.13.tbz apache-2.2.15_1.tbz apache-2.2.13-2.2.15_1.tbz </code> ===== Applying the patch file ===== To apply the patch file ''%%apache-2.2.13-2.2.15_1.tbz%%'' to the system having ''%%apache-2.2.13.tbz%%'' installed: <code> pkg_patch -a apache-2.2.13-2.2.15_1.tbz </code> ===== Mass package generation ===== To mass-generate a directory of package patches from two directories of packages containing the "old" and "new" packages (with the regular naming convention), with the intention that the patch directory be hosted as ''%%"http://ftp.freebsd.org/pub/packages/8.0-8.1/"%%'' (This link is broken): <code> ./pkg_patch -mb -r http://ftp.freebsd.org/pub/packages/8.0-8.1/ olddir newdir patchdir </code> This will generate the patches from found files and create the patch index file referencing the above URL. This index file describes available patches and the URL from which to get them. ===== Automatic updates with new patches ===== To compare the currently installed packages with the list of package patches generated in the last step and update available packages with patches: <code> ./pkg_patch -u http://ftp.freebsd.org/pub/packages/8.0-8.1/ </code> ivanvoras/pkg_patch/tutorial.txt Last modified: 2020/10/31 01:29by SashaVigole