Hi Himanshu, When I created a plugin, I started by running extras/emacs/make-plugin.sh. That script automatically set things up so the plugin could be built and installed with the other VPP plugins. Then I started adding actual code to the stubbed-out files which the script created. I tested that script again just now and the stub plugin that is created by that script seems to have been built successfully and it was included in the vpp-plugins RPM that was built when I ran 'make pkg-rpm'. I did the following while in a directory containing a VPP repo which was freshly cloned from gerrit:
sudo dnf install emacs cd src/plugins ../../extras/emacs/make-plugin.sh I was asked for a name of the plugin and whether it was dual loop, I typed 'foobar' for the name and chose dual loop. The script ran for a second and there were files under src/plugins/foobar when it completed. git add foobar git commit cd ../.. make pkg-rpm After waiting a while for the build to complete: $ rpm -qlp build-root/vpp-plugins-21.01-rc0~84_gf79b34036.x86_64.rpm | grep foobar /usr/lib/vpp_api_test_plugins/foobar_test_plugin.so /usr/lib/vpp_plugins/foobar_plugin.so /usr/share/vpp/api/foobar.api.json It should be noted that this didn't work on my first attempt because I did not commit the files under src/plugins/foobar. The pkg-rpm target builds a tar archive of source files using 'git archive'. If you had files for the plugin which are on your local filesystem and the files have not been committed in the local repo, they won't be built. Even if you don't feel like using that script, you shouldn't need to do anything special. The RPM spec file at extras/rpm/vpp.spec has this: %files plugins %defattr(-,bin,bin) /usr/lib/vpp_plugins/* /usr/lib/vpp_api_test_plugins/* /usr/share/vpp/api/* If your plugin files are being installed under /usr/lib/vpp_plugins, /usr/lib/vpp_api_test_plugins, and /usr/share/vpp/api, the above ought to cause it to be included in vpp-plugins automatically. In src/plugins/<your plugin name>, is there a CMakeLists.txt with an add_vpp_plugin() in it? -Matt On Fri, Mar 13, 2020 at 11:42 PM Himanshu Rakshit <hr0...@gmail.com> wrote: > Hi All, > > We have developed a custom plugin (under the folder *src/plugin*). We are > able to compile it successfully and also able to run in the local setup > using *make run* or *make debug* command. > > Our intention is not run in a different system(different for the build > system). So we make the rpm package using the *make pkg-rpm *command and > install the rpms in the remote system. But the custom plugin is not a part > of the rpm packages and not installed in the system. > > Need your help on this. > > What is best possible way to install the custom plugin in a remote > system(different form the build system.) > > I followed the following steps > > *make install-dep* > *make build* > *make pkg-rpm* > > *rpm -ivh <vpp rpms>* > > Thanks, > Himanshu > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#17485): https://lists.fd.io/g/vpp-dev/message/17485 Mute This Topic: https://lists.fd.io/mt/71944155/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-