PKG_REPO_CREATE(3)     FreeBSD Library Functions Manual     PKG_REPO_CREATE(3)

NAME

     pkg_repo_create, pkg_repo_create_new, pkg_repo_create_free,
     pkg_repo_create_set_output_dir, pkg_repo_create_set_create_filelist,
     pkg_repo_create_set_hash, pkg_repo_create_set_hash_symlink,
     pkg_repo_create_set_metafile, pkg_repo_create_set_sign - create
     repository of packages

LIBRARY

     library "libpkg"

SYNOPSIS

     #include <pkg.h>

     struct pkg_repo_create *
     pkg_repo_create_new();

     void
     pkg_repo_create_free(struct pkg_repo_create *);

     bool
     pkg_repo_create_set_output_dir(struct pkg_repo_create *, const char *);

     void
     pkg_repo_create_set_create_filelist(struct pkg_repo_create *, bool);

     void
     pkg_repo_create_set_hash(struct pkg_repo_create *, bool);

     void
     pkg_repo_create_set_hash_symlink(struct pkg_repo_create *, bool);

     void
     pkg_repo_create_set_metafile(struct pkg_repo_create *, const char *);

     void
     pkg_repo_create_set_sign(struct pkg_repo_create *, char **, int,
         pkg_password *);

     int
     pkg_repo_create(struct pkg_repo_create *, char *);

DESCRIPTION

     pkg_repo_create_new() Allocates a new struct pkg_repo_create * which
     should be freed by the caller using pkg_repo_create_free().

     pkg_repo_create_set_output_dir() defines the output directory to save the
     data in.  By default it will be the path provided to the
     pkg_repo_create() function.

     pkg_repo_create_set_create_filelist() Accept a boolean to define if the
     file database should be created along with the metadata database
     (deprecated).  Defaults to false.

     pkg_repo_create_set_hash() When creating the repository, move all the
     packages found into a "Hashed" subdirectory with the "hash" of the
     package appended to the name of the package.  Defaults to false.

     pkg_repo_create_set_hash_symlink() If the hash functionality has been
     activated, then there will be a symlink for each packages in the "Hashed"
     directory will be created in the root of the repository.  Defaults to
     false.

     pkg_repo_create_set_metafile() Define the path to the metafile that will
     be used when creating the repository. If none is specified that it will
     fallback on the internal default.

     pkg_repo_create_set_sign() Define the signing mechanism, which will be
     used to sign the metadata of the repository. Defaults to none.

     pkg_repo_create() Create a repository out of the packages found in the
     provided path

FreeBSD 15.1-STABLE-HBSD       December 12, 2025            PKG_REPO_CREATE(3)