Bug 13877

Summary: package manager not working
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jonathan Richardson <jon.richardson>
Component: coreAssignee: Joe Slater <joe.slater>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 3.1   
Target Milestone: 3.2 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Jonathan Richardson 2020-04-16 12:52:47 UTC
I haven't been able to get the package manager to work for a long time now. Using lighttpd this is my procedure (ubuntu distro):

sudo apt-get install lighttpd
cd /var/www
ln -s /home/jonathar/work/yocto/master/poky/build/tmp/deploy/rpm rpm
sudo service lighttpd restart

bitbake some-recipe
bitbake package-index

On target:
export PACKAGE_FEED=rpm
mkdir -p /etc/yum.repos.d/
echo -e "[yocto-packages]\nname=Yocto packages\nbaseurl=http://10.136.4.151/${PACKAGE_FEED}\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/yocto-packages.repo

root@bcm958742k:~# dnf makecache
Yocto packages                                                                                          0.0  B/s |   0  B     00:00    
Failed to synchronize cache for repo 'yocto-packages'
Ignoring repositories: yocto-packages
Metadata cache created.

The result is the same if I create the conf file automatically with these vars:
PACKAGE_FEED_URIS = "https://10.136.4.151"
PACKAGE_FEED_BASE_PATHS = "rpm"

I'm not sure if there were changes in lighttpd or if the package manager changed at some point.
Comment 1 Joe Slater 2020-08-12 12:12:26 UTC
dnf fetching from lighttpd works for me, but there are a couple of differences from the description.

Besides lighttpd I needed gamin on the host in order for lighttpd to start.

The rpm link should be /var/www/html/rpm.  And the directory pointed to must have been processed with something like createrepo.

If, on the target, "wget http://<host>/rpm/repodata/repomd.xml" works, "dnf makecache" should work, too.
Comment 2 Randy MacLeod 2020-08-13 08:24:43 UTC
Jonathan,
Joe isn't able to reproduce the issue. Do you have lighttpd configure properly as Joe explained? If not and you're no longer able to reproduce the error, please close the bug. Thanks.
Comment 3 Jonathan Richardson 2020-08-13 14:54:16 UTC
Putting the link in /var/www/html instead of /var/www solved the problem. Weird.. I used to create it in www and it worked for some reason. That's all it was. Thanks, this can be closed.
Comment 4 Randy MacLeod 2020-08-17 10:41:04 UTC
Thanks Jonathan.

Joe, Do the docs need to be updated to cover this usage?
Comment 5 Joe Slater 2020-08-17 11:28:12 UTC
(In reply to comment #4)
> Thanks Jonathan.
> 
> Joe, Do the docs need to be updated to cover this usage?

Not that I can see.  The yocto "tips & tricks" assumes the server data will be under /var/www/html.  I suppose the web server could be configured differently, but this looks like the default.