NFS LuCI front end

I proposed to make a front end for our nfs-share which is not available even samba has front end, there's preformation issue with samba.
If there already exits kindly name it, i have not seen in package list.

I tried something but not sure how good it is using old luci-app
look here

how to commit it
Is there documentation for app making in LEDE+LuCI ??

you should make a fork of the Luci source repo in Github, clone that fork locally, then develop the luci-app-nfs app there, compile and install that app to your own router.

In practice you might edit the code in you normal LEDE environment's Luci feed repo, but you need the fork for submitting the final code to the Luci Github repo.

And when that app works, then submit a pull request to the Luci github repo, so that your code could be pulled into the official repo.

Easiest might actually be to simply copy everything in your local luci feed dir (feeds/luci) from the directory applications/luci-app-samba to a new applications/luci-app-nfs dir and then start editing the files. Probably quite many options have some resemblance, so you might get forward quickly.

And you can forget about the translations (in "po" directory) at this point. They might be added after the whole app is ready, but they are not mandatory. Chiefly you need the "luasrc" dir and its subdirectories.

EDIT:
Just as a reference: I added the luci-app-adblock a year ago:

That shows you the various parts needed.Mainly the model/cbi with the options, a menu item in controller, and adding the trigger for config changes.

1 Like

ok i am trying, not good coder,
stuck at
xyz@local-nix:~/feeds/luci$ make -B --makefile=luci.mk
luci.mk:91: /package.mk: No such file or directory
make: *** No rule to make target '/package.mk'. Stop.
xyz@local-nix:~/feeds/luci$ make -B --makefile=luci.mk
luci.mk:91: /package.mk: No such file or directory
make: *** No rule to make target '/package.mk'. Stop.
xyz@local-nix:~/feeds/luci$

but i will fix it, i have to read how to git, new here

No, you need the full LEDE build system. You can't make luci packages separately without the LEDE toolchain.

  • You create the new package there in ./feeds/luci/applications/luci-app-nfs,
  • then in the buildroot root . you
    • use "./scripts/feeds update" to find and
    • "./scripts/feeds install" to make it available for config.
    • Then you select the new package to your .config with "make menuconfig"
    • and finally compile it as part of your firmware, or separately as "make package/luci-app-nfs/compile".

Just practice first with an existing luci package. For example, compile luci-app-adblock so that you get the hang of the commands.

https://lede-project.org/docs/guide-developer/start
https://lede-project.org/docs/guide-developer/use-buildsystem

again stuck at

./scripts/feeds update -a
Updating feed 'luci' from 'https://github.com/kdm6389/luci.git' ...
Already up-to-date.
Create index file './feeds/luci.index'
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... failed.
Checking 'zlib'... failed.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)
Build dependency: Please install a static zlib. (Missing libz.a or zlib.h)

/home/kushal/lede/source/include/prereq.mk:12: recipe for target 'prereq' failed
Prerequisite check failed. Use FORCE=1 to override.
/home/kushal/lede/source/include/toplevel.mk:153: recipe for target 'staging_dir/host/.prereq-build' failed
make: *** [staging_dir/host/.prereq-build] Error 1


I am using ubuntu amd64

Sounds like you have not installed all prerequisites listed in wiki. Depending on your buildhost, you need a slightly varying set of packages in the host itself.

https://lede-project.org/docs/guide-developer/install-buildsystem

(there is a ready apt-get recipe for Ubuntu x64 on that page)

$make menuconfig #(It is tough job a lot of thing inside :cry::tired_face:)
myuser@mypc:~/lede/source$ make -j1 V=s package/luci-app-adblock/compile
make[1]: Entering directory '/home/myuser/lede/source'
cd "/home/myuser/lede/source"; git log --format=%h -1 toolchain > /home/myuser/lede/source/tmp/.ver_check
cmp -s /home/myuser/lede/source/tmp/.ver_check /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl/stamp/.ver_check || {
rm -rf /home/myuser/lede/source/build_dir/target-powerpc_464fp_musl /home/myuser/lede/source/staging_dir/target-powerpc_464fp_musl /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl /home/myuser/lede/source/build_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl;
mkdir -p /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl/stamp;
mv /home/myuser/lede/source/tmp/.ver_check /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl/stamp/.ver_check;
}
make[1]: *** No rule to make target 'package/luci-app-adblock/compile'. Stop.
make[1]: Leaving directory '/home/myuser/lede/source'
/home/myuser/lede/source/include/toplevel.mk:199: recipe for target 'package/luci-app-adblock/compile' failed
make: *** [package/luci-app-adblock/compile] Error 2
myuser@mypc:~/lede/source$ make -j1 V=s package/luci-app-nfs/compile
make[1]: Entering directory '/home/myuser/lede/source'
cd "/home/myuser/lede/source"; git log --format=%h -1 toolchain > /home/myuser/lede/source/tmp/.ver_check
cmp -s /home/myuser/lede/source/tmp/.ver_check /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl/stamp/.ver_check || {
rm -rf /home/myuser/lede/source/build_dir/target-powerpc_464fp_musl /home/myuser/lede/source/staging_dir/target-powerpc_464fp_musl /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl /home/myuser/lede/source/build_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl;
mkdir -p /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl/stamp;
mv /home/myuser/lede/source/tmp/.ver_check /home/myuser/lede/source/staging_dir/toolchain-powerpc_464fp_gcc-5.4.0_musl/stamp/.ver_check;
}
make[1]: *** No rule to make target 'package/luci-app-nfs/compile'. Stop.
make[1]: Leaving directory '/home/myuser/lede/source'
/home/myuser/lede/source/include/toplevel.mk:199: recipe for target 'package/luci-app-nfs/compile' failed
make: *** [package/luci-app-nfs/compile] Error 2
Any help
Even luci-app-adblock is not compiling properly

still trying ...

While in your SDK directory:

cd package
git clone git@github.com:openwrt/luci.git
cd ..
make package/luci/applications/luci-app-adblock/compile