1 1
Edwin

image build problems with custom package-ref/upstream version

Recommended Posts

Hi,

  I’m trying to integrate the newly released hostapd 2.7 into an image and I’m having trouble including it as a part of the image build process (bionic on vagrant - by the book). My tree is a few weeks out of date, but I can’t see any subsequent commits to the scripts that seem to be the source of my trouble.

 

My build config is:

KERNEL_ONLY="no"         
KERNEL_CONFIGURE="no"    
CLEAN_LEVEL="make,debs,oldcache"                  
DEST_LANG="en_US.UTF-8" # sl_SI.UTF-8, en_US.UTF-8                                                              
KERNEL_KEEP_CONFIG="no" # do not overwrite kernel config before compilation                          
EXTERNAL="yes"          # build and install extra applications and drivers                           
EXTERNAL_NEW="compile"  # compile and install or install prebuilt additional packages                
CREATE_PATCHES="no"      
BUILD_ALL="no"           
BSPFREEZE=""             
INSTALL_HEADERS=""       
BOARD="nanopineo"        
BRANCH="next"                                                           
RELEASE="stretch"    

 

Additionally, I’ve change packages/extras-buildpkgs/90-hostapd.conf to have

local package_ref="tag:hostap_2_7"
local package_upstream_version="3:2.7-00"

 

And have removed the patches under packages/extras-buildpkgs/hostapd/debian/patches.

 

During the build, I see the 2.7-00 package being loaded into the temporary repo created in chroot_installpackages_local


 

Local repo [temp] successfully added.                                                                 
You can run 'aptly repo add temp ...' to add packages to repository.                                  
Loading packages...                                                                                   
[+] xserver-xorg-video-armsoc-sun4i_1.4.1~armbian5.65+1_armhf added                                   
Loading packages...                                                                                   
[+] hostapd-realtek_3:2.5-1~armbian5.65+1_arm64 added                                                 
[+] hostapd-realtek_3:2.5-1~armbian5.65+1_armhf added                                                 
[+] hostapd_3:2.7-00~armbian5.65+1_arm64 added                                                        
[+] hostapd_3:2.7-00~armbian5.65+1_armhf added                                                        
[+] mmc-utils_0~gita3d3331-3~armbian5.65+1_arm64 added                                                
[+] mmc-utils_0~gita3d3331-3~armbian5.65+1_armhf added                                                
[+] sunxi-tools_1.4.2-2~armbian5.65+1_arm64 added                                                     
[+] sunxi-tools_1.4.2-2~armbian5.65+1_armhf added                                                     

But then see errors when setting up the temporary repo:


 

Generating metadata files and linking package files...                                                
Finalizing metadata files...                                                                          
Signing file 'Release' with gpg, please enter your passphrase when prompted:                          
gpg: WARNING: unsafe ownership on homedir '/home/vagrant/.gnupg'                                      
gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect                               
gpg: skipped "925644A6": No secret key
gpg: signing failed: No secret key
ERROR: unable to publish: unable to detached sign file: exit status 2
[ .... ] Installing additional packages [ EXTERNAL_NEW ]
No published repositories, unable to serve.
OK
Err:1 http://localhost:8189 stretch InRelease
  Could not connect to localhost:8189 (127.0.0.1). - connect (111: Connection refused) [IP: 127.0.0.1 8189]

Subsequently it is unable to find the 2.7 deb and hostapd stays at armbian’s 2.6-99

Reading package lists...                            
W: Failed to fetch http://localhost:8189/dists/stretch/InRelease  Could not connect to localhost:8189 (127.0.0.1). - connect (111: Connection refused) [IP: 127.0.0.1 8189]
W: Some index files failed to download. They have been ignored, or old ones used instead.             
Reading package lists...                         
Building dependency tree...                                                                           
Reading state information...                       
hostapd is already the newest version (3:2.6-99~armbian5.60+1).                         

 

Can anyone suggest what might be happening here, and where I might look next as I try to resolve this? It’s the first time I’ve tried to compile extra applications but I can’t find anything in the doco or forum that seems related to this situation.

 

Thanks,

Edwin.

Share this post


Link to post
Share on other sites

Thank you, Igor.

 

When I get it building successfully, and have done some testing, would there be appetite for a PR to bump the Armbian version to 2.7?

Share this post


Link to post
Share on other sites

I've rebased my branch and pulled in commits up to b4e5c589169a076dc081c101448b35cff26b6f12 (Dec 6) and I'm seeing the same problem i.e.

Local repo [temp] successfully added.
You can run 'aptly repo add temp ...' to add packages to repository.
Loading packages...
[+] xserver-xorg-video-armsoc-sun4i_1.4.1~armbian5.65+1_armhf added
[+] xserver-xorg-video-armsoc-sun4i_1.4.1~armbian5.67+1_armhf added
Loading packages...
[+] hostapd-realtek_3:2.5-1~armbian5.65+1_arm64 added

... snip

[+] sunxi-tools_1.4.2-2~armbian5.67+1_armhf added
Loading packages...
Generating metadata files and linking package files...
Finalizing metadata files...
Signing file 'Release' with gpg, please enter your passphrase when prompted:
gpg: WARNING: unsafe ownership on homedir '/home/vagrant/.gnupg'
gpg: WARNING: "--no-use-agent" is an obsolete option - it has no effect
gpg: skipped "925644A6": No secret key
gpg: signing failed: No secret key
ERROR: unable to publish: unable to detached sign file: exit status 2

It's reproducible in the VM (without going through the build process each time), and poking around further I wonder whether something's wrong with the secret keyring:

root@vagrant:/home/vagrant/armbian# gpg --no-default-keyring --keyring packages/extras-buildpkgs/buildpkg.gpg --list-keys
gpg: DBG: FIXME: merging secret key blocks is not anymore available
gpg: Oops; key lost!
gpg: DBG: node 0x000055f20ab67cd0 01/00 type=secret-key
gpg: DBG: node 0x000055f20ab67e10 00/00 type=user-id  "Armbian builder (Temporary key for installing packages during Armbian image creation) <root@localhost>" ....
gpg: DBG: node 0x000055f20ab67fc0 00/00 type=signature  class=13 keyid=925644A6 ts=1470410930
gpg: DBG: node 0x000055f20ab6a7a0 00/00 type=secret-subkey
gpg: DBG: node 0x000055f20ab6ab60 00/00 type=signature  class=18 keyid=925644A6 ts=1470410930
packages/extras-buildpkgs/buildpkg.gpg
--------------------------------------
root@vagrant:/home/vagrant/armbian# gpg --no-default-keyring --keyring packages/extras-buildpkgs/buildpkg.gpg --list-secret-keys
root@vagrant:/home/vagrant/armbian#

I'm quite unfamiliar with GPG, so it's possible I'm way off track but the "Oops; key lost!" is consistent with the inability for aptly to publish because it can't find the secret key.

 

Any suggestions?

 

 

Share this post


Link to post
Share on other sites
2 hours ago, Edwin said:

I've rebased my branch and pulled in commits up to b4e5c589169a076dc081c101448b35cff26b6f12 (Dec 6) and I'm seeing the same problem i.e.


I am not sure this part of the script - rebuilding packages - were tested in anything that native environment. Not sure for Vagrant, but for Docker this is disabled out of the box:

[ warn ] EXTERNAL_NEW=compile is not available when running in container, setting to prebuilt 

It works for me on KVM host. 

 

10 hours ago, Edwin said:

When I get it building successfully, and have done some testing, would there be appetite for a PR to bump the Armbian version to 2.7?


If there are no issues, sure, why not. I hope all our patches also apply?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1