.\" Generated by scdoc 1.11.4 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "apk-mkndx" "8" "2025-12-12" .PP .SH NAME .PP apk mkndx - create apkv3 repository index file from packages .PP .SH SYNOPSIS .PP \fBapk mkndx\fR [<\fIoptions\fR>.\&.\&.\&] \fIpackages\fR.\&.\&.\& .PP .SH DESCRIPTION .PP \fBapk mkndx\fR creates a repository index from a list of package files.\& See \fBapk-repositories\fR(5) for more information on repository indicies.\& .PP .SH OPTIONS .PP \fB--description\fR, \fB-d\fR \fITEXT\fR .RS 4 Add a description to the index.\& Upstream, this is used to add version information based on the git commit SHA of aports HEAD at the time of index generation.\& .PP .RE \fB--filter-spec\fR \fIPKGNAME_SPEC\fR .RS 4 Filter previous index only.\& Each argument should be \fIPKGNAME_SPEC\fR formatted name of a package to include from the index.\& This can be used to create a subset of existing index.\& .PP .RE \fB--hash\fR \fIHASH\fR .RS 4 Use \fIHASH\fR as the algorithm for apk v3 integrity.\& Currently supported: .PD 0 .IP \(bu 4 sha256 (default) .IP \(bu 4 sha256-160 .PD .PP The \fBsha256-160\fR is allowed to generate index compatible with old prereleases of apkv3 that do no handle longer hashes correctly.\& .PP .RE \fB--index\fR, \fB-x\fR \fIINDEX\fR .RS 4 Read an existing index from \fIINDEX\fR to speed up the creation of the new index by reusing data when possible.\& .PP .RE \fB--output\fR, \fB-o\fR \fIFILE\fR .RS 4 Output generated index to \fIFILE\fR.\& .PP .RE \fB--pkgname-spec\fR \fIPKGNAME_SPEC\fR .RS 4 Specify package name specification for downloading the packages.\& APK will construct the download URL relative to index file by expanding this specification with package specific values.\& .PP If the specification contains :// it is considered an absolute URL instead of relative.\& This is not recommended for public repositories as using absolute package name specification would prevent mirroring.\& However, this is useful in build environment to create a subset of an index and have it refer to packages in another repository.\& .PP If not specified, the default will be determined by \fBapk\fR at runtime based on how the repository is referenced: .PD 0 .IP \(bu 4 ${arch}/${name}-${version}.\&apk if referenced by repository base path URL .IP \(bu 4 ${name}-${version}.\&apk if referenced by repository index file URL .PD .PP Currently supported substitution variables are: .PD 0 .IP \(bu 4 name .IP \(bu 4 version .IP \(bu 4 arch .IP \(bu 4 hash .PD .PP Additionally a prefix of the variable can used with syntax: \fB${name:4}\fR.\& This truncates the substition to maximum of 4 characters.\& .PP The specification writer should ensure that the repository does not contain multiple packages that would expand to same package filename.\& .RE