Custom opnsense package failing during installation

Started by primroseN, July 23, 2026, 12:49:08 PM

Previous topic - Next topic
Hello,

I'm creating a custom package and have run into an issue with the package installation process.

My package directory is:

/usr/plugins/devel/my_package

The directory contains the following:

+POST_INSTALL.post
Makefile
pkg-descr
src/ — containing the required application files, including the MVC structure, etc, and other directories.

From the /usr/plugins/devel/my_package directory, I run:

make package

The package is created successfully, and I then upload it to a private package repository.

I have also added the repository configuration under pkg/repos/myConf, allowing me to install the package using:

pkg install my_package

The problem is that when I install the package from the repository, it gets extracted successfully, but the post-installation script is not run and neither is the package present in the db. [Running pkg info my_package doesn't return the package ]

Additionally, after installation, I find files with names similar to the following throughout the installation directories:

.pkgtemp.actions_xxx.conf.nLalueg1gdd2

Has anyone encountered this issue before?

Could this be related to how the package is being built?

hello
 This issue is usually caused by a missing +MANIFEST file or explicitly declared packing list (pkg-plist/PLIST_FILES), leading to pkg thinking that a plain archive extraction is taking place instead of a proper transaction commit. When it fails to finalize the database commit, it will fail silently at the end of the extraction, leaving mess of .pkgtemp. files, not executing post-install scripts and refusing to create an entry in pkg.db. The proper way is to make sure that your Makefile lists all targets and files to be installed and utilizes standard ports macros (like those defined in SUB_FILES) to declare post-install phases instead of leaving some +POST_INSTALL.post lying around in your ports tree. You can check if your package actually contains the manifest by running pkg info -F my_package . pkg command.