Cannot add my custom package to image builder

Hi,

I created a simple shell script and want to have it packaged so I can use it accross systems. I read the wiki and built my ipk via SDK. However when I copy the ipk it in 'packages' directory of my imagebuilder (openwrt-imagebuilder-23.05-SNAPSHOT-ipq40xx-generic.Linux-x86_64) and include package name (pushover) in makefile PACKAGES option I get 'unknown package' error. I tried commenting out in repositories.conf option check_signature adn adding src custom file:packages in the beggingin but same error). What am I doing wrong? :frowning:

Here is my package's makefile - it just installs shell script and default config:

include $(TOPDIR)/rules.mk

PKG_NAME:=pushover
PKG_VERSION:=1
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define Package/pushover
	SECTION:=utils
	CATEGORY:=Utilities
	TITLE:=Send push notifications using pushover.net
	DEPENDS:=+curl
	PKGARCH:=all
endef

define Package/pushover/description
  Send push notification to mobile devices using pushover.net
endef

define Package/pushover/conffiles
/etc/config/pushover
endef

define Build/Compile
endef

define Package/pushover/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) ./files/pushover $(1)/usr/bin/pushover
	$(INSTALL_DIR) $(1)/etc/config
	$(INSTALL_DATA) ./files/pushover.config $(1)/etc/config/pushover
endef

$(eval $(call BuildPackage,pushover))

This is so frustrating, due to lack of error messages that would indicate what is wrong. I rebuilt my package using a custom feed - I initially just shoved it inside base feed. So I figured out that some signature mechanism is preventing the package from being included. Unfortunately my custom-feed-built package is still not included and only feedback from ancient like carbon make is:

...
Unknown package 'pushover'.
Installing ath10k-board-qca4019 (20230804-1) to root...
...
Collected errors:
 * opkg_install_cmd: Cannot install package pushover.
make[2]: *** [Makefile:189: package_install] Error 255
make[1]: *** [Makefile:144: _call_image] Error 2
make: *** [Makefile:262: image] Error 2

EDIT: I did several make clean before adding the ipk into image builder, but no luck. I love OpenWRT so much but absolutely hate my guts with c and make stuff :smiley:

So this might be unrelated to image builder - the error is same when I try to install the package on a live system:

# opkg install ./pushover-1-r1.apk
Unknown package './pushover-1-r1.apk'.
Collected errors:
 * opkg_install_cmd: Cannot install package ./pushover-1-r1.apk.

Have you tried build everything from source code?

Imagebuilder doesn’t build anything, it only packages already build things to a complete image. And you can’t mix packages build with different build dates.

1 Like

Yep, I didn't word it correctly :slight_smile:

Can you elaborate? Is the build date included in some package metadata? Or you mean simply a timestamp of the file?

Thanks for pointing this out :smiley: Thanks to you I realized that I was building from master branch in SDK. When I switched to realease tag that matched the snapshot all went smoothly and my package got included <3

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.