Posted: Sun Feb 13, 2022 17:37 Post subject: opkg malformed package error
Hello everyone.
First off, I would not be here had I not googled this error extensively already, I also hope this is the right board for it.
So, I am trying to install additional self created packages onto my DD-WRT running on a Netgear R7000 for a research project. I installed Entware on a USB.
For that purpose I am creating the ipk by hand, as, theoretically, this should not be very hard.
However, I am continuously running into the following error, with no additional debug info:
helloworld-package
|-- control
|-- data
| `-- opt
| |-- bin
| | `-- helloworld.sh
| `-- etc
| `-- init.d
| `-- helloworld
`-- debian-binary
5 directories, 4 files
This is my control file
Code:
Files: data/opt/bin/helloworld.sh data/opt/etc/init.d/helloworld
Package: helloworld-package
Version: 3.0
Depends: sh
Source: package/system/helloworld-package
SourceName: helloworld_package
Maintainer: maintainer@maintainer.tld
License: GPL-2.0-only
Section: base
SourceDateEpoch: 1611926981
Architecture: arm_cortex-a9
Description: This is an example hello world IPK package
And this is the script I am packaging the ipk with
ar r $packagename debian-binary data.tar.gz control.tar.gz
# clean up
mv $packagename ..
rm ./data.tar.gz ./control.tar.gz
echo "finished building ipk"
I am not completely sure if the control file must be in its own folder CONTROL or not, since all tutorials in the internet are saying it needs to be, but when I unpack an official package, it is not.
Any help would be greatly appreciated, I really have no idea what is going wrong.
this is the wrong one, no meter its for Broadcom, its not for dual core router
cd /opt (click enter)
wget http://bin.entware.net/mipselsf-k3.4/installer/generic.sh (click enter)
sh generic.sh (click enter) _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Joined: 08 May 2018 Posts: 14242 Location: Texas, USA
Posted: Tue Feb 15, 2022 1:12 Post subject: Re: opkg malformed package error
Some people skip the meat of the OP:
akra wrote:
So, I am trying to install additional self created packages onto my DD-WRT running on a Netgear R7000 for a research project. I installed Entware on a USB.
For that purpose I am creating the ipk by hand, as, theoretically, this should not be very hard.
Posted: Tue Feb 15, 2022 7:12 Post subject: Re: opkg malformed package error
kernel-panic69 wrote:
Some people skip the meat of the OP:
akra wrote:
So, I am trying to install additional self created packages onto my DD-WRT running on a Netgear R7000 for a research project. I installed Entware on a USB.
For that purpose I am creating the ipk by hand, as, theoretically, this should not be very hard.
What exactly are you using to create these packages?
For creating the packages I am using the shell script in my initial post. This basically first creates the archives control.tar.gz, data.tar.gz and then puts the archives and debian-binary into the .ipk with the command ar. I have also tried using tar for the final .ipk, but no difference.
cp debian-binary tmp
cd tmp
tar -czf ../../$packagename ./*
# clean up
cd ..
rm -rf tmp
echo "finished building ipk"
It uses ./* as an argument to all three tar commands so the control file is placed by itself in a directory called control, and a tmp subdirectory is created/deleted on the fly. I had to delete your Depends line from the control file as dd-wrt already has /bin/sh built in. I prefixed the script in init.d with S99 to be consistent with other entware init scripts.
# opkg files helloworld-package
Package helloworld-package (3.0) is installed on root and has the following files:
/opt/etc/init.d/S99helloworld
/opt/bin/helloworld.sh