/ docs / pkg_repo_create.3
pkg_repo_create.3
 1  .Dd December 12, 2025
 2  .Dt PKG_REPO_CREATE 3
 3  .Os
 4  .Sh NAME
 5  .Nm pkg_repo_create ,
 6  .Nm pkg_repo_create_new , pkg_repo_create_free ,
 7  .Nm pkg_repo_create_set_output_dir , pkg_repo_create_set_create_filelist ,
 8  .Nm pkg_repo_create_set_hash , pkg_repo_create_set_hash_symlink ,
 9  .Nm pkg_repo_create_set_metafile , pkg_repo_create_set_sign
10  .Nd create repository of packages
11  .Sh LIBRARY
12  .Lb libpkg
13  .Sh SYNOPSIS
14  .In pkg.h
15  .Ft struct pkg_repo_create *
16  .Fn pkg_repo_create_new
17  .Ft void
18  .Fn pkg_repo_create_free "struct pkg_repo_create *"
19  .Ft bool
20  .Fn pkg_repo_create_set_output_dir "struct pkg_repo_create *" "const char *"
21  .Ft void
22  .Fn pkg_repo_create_set_create_filelist "struct pkg_repo_create *" "bool"
23  .Ft void
24  .Fn pkg_repo_create_set_hash "struct pkg_repo_create *" "bool"
25  .Ft void
26  .Fn pkg_repo_create_set_hash_symlink "struct pkg_repo_create *" "bool"
27  .Ft void
28  .Fn pkg_repo_create_set_metafile "struct pkg_repo_create *" "const char *"
29  .Ft void
30  .Fn pkg_repo_create_set_sign "struct pkg_repo_create *" "char **" "int" "pkg_password *"
31  .Ft int
32  .Fn pkg_repo_create "struct pkg_repo_create *" "char *"
33  .Sh DESCRIPTION
34  .Fn pkg_repo_create_new
35  Allocates a new
36  .Ft struct pkg_repo_create *
37  which should be freed by the caller using
38  .Fn pkg_repo_create_free .
39  .Pp
40  .Fn pkg_repo_create_set_output_dir
41  defines the output directory to save the data in.
42  By default it will be the
43  .Va path
44  provided to the
45  .Fn pkg_repo_create
46  function.
47  .Pp
48  .Fn pkg_repo_create_set_create_filelist
49  Accept a boolean to define if the file database should be created
50  along with the metadata database
51  .Pq deprecated .
52  Defaults to
53  .Va false .
54  .Pp
55  .Fn pkg_repo_create_set_hash
56  When creating the repository, move all the packages found into a
57  .Qq Hashed
58  subdirectory with the
59  .Qq hash
60  of the package appended to the name of the package.
61  Defaults to
62  .Va false .
63  .Pp
64  .Fn pkg_repo_create_set_hash_symlink
65  If the
66  .Va hash
67  functionality has been activated, then there will be a symlink for each
68  packages in the
69  .Qq Hashed
70  directory will be created in the root of the repository.
71  Defaults to
72  .Va false .
73  .Pp
74  .Fn pkg_repo_create_set_metafile
75  Define the
76  .Va path
77  to the metafile that will be used when creating the repository. If none is
78  specified that it will fallback on the internal default.
79  .Pp
80  .Fn pkg_repo_create_set_sign
81  Define the signing mechanism, which will be used to sign the metadata of the
82  repository. Defaults to none.
83  .Pp
84  .Fn pkg_repo_create
85  Create a repository out of the packages found in the provided
86  .Va path