Code Monkey home page Code Monkey logo

Comments (18)

kolyagora avatar kolyagora commented on May 18, 2024

I'm trying to make the package myself but I have no experience so I stuck at the beginning and hope to get some assistance here.

At first, I added my custom feed to feeds.conf:

...
src-link custom /opt/myfeed

Then I created /opt/myfeed/rar2fs/Makefile and added the package to the repo:

./scripts/feeds update custom
./scripts/feeds install rar2fs

The feed and the package appeared in corresponding feeds and package/feeds directories.
But it looks like make package/rar2fs/compile doesn't even start fetching the package's source code, however it builds the package's dependencies just fine (and all other packages I've tried). This is the output I get:

builder@1b9d5d40dc1f:/opt/entware/Entware-ng$ make package/rar2fs/compile
Collecting package info: done
 make[1] package/rar2fs/compile
 make[2] -C package/libs/toolchain compile
 make[2] -C feeds/packages/utils/unrar compile
 make[2] -C package/utils/fuse compile
 make[2] -C /opt/myfeed/rar2fs compile

V=s doesn't show any errors either. Sources are only get downloaded and extracted to build_dir as a result of explicit make package/rar2fs/prepare command. But even when source code is in the place, subsequent make package/rar2fs/compile doesn't try to do something with it.

I'm attaching the Makefile (added .txt extension just to be able to attach it here). Of course it's far from being complete but for now I just want to make it start doing something with the package's sources.

Makefile

So what can be a reason for such strange behavior?

from entware-ng.

ryzhovau avatar ryzhovau commented on May 18, 2024

This is normal behavior, after installing all packages from your feed, you have to mark it with [m] from make menuconfig. Some packages are marked to be compiled, some not. For more details, please refer OpenWrt Buildroot docs.

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

Thanks, it helped indeed. I've successfully built the package and been able to run it on my x86-64 NAS. However, it requires some manual tuning which I'd like to avoid. As stated in rar2fs wiki, it requires complete unrar source and libunrar.so during the build. I'm using the following code in the Makefile to reference both:

CONFIGURE_ARGS += \
        --with-unrar=$(BUILD_DIR)/unrar-5.3.7/unrar \
        --with-unrar-lib=$(BUILD_DIR)/unrar-5.3.7/unrar

But, as you can see, it relies on unrar package version and its PKG_BUILD_ROOT format. Is there a way to achieve the same in a more appropriate manner?

Makefile

from entware-ng.

ryzhovau avatar ryzhovau commented on May 18, 2024

So what's performance of this binaries? I'm afraid it'll be painfully slow on MIPS or ARM routers.

from entware-ng.

zyxmon avatar zyxmon commented on May 18, 2024

Is there a way to achieve the same in a more appropriate manner?

Openwrt unrar package should be fixed. It is missing InstallDev section!

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

So what's performance of this binaries? I'm afraid it'll be painfully slow on MIPS or ARM routers.

[~] # dd if=/share/CACHEDEV1_DATA/unrar/file.mkv of=/dev/null
25226792+1 records in
25226792+1 records out
12916117931 bytes (13 GB) copied, 132.067 s, 97.8 MB/s

I'm running QNAP TS-253 Pro powered by Celeron J1900 with 2 WD Red's in RAID1. Average CPU load was about 10% during the test.

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

Openwrt unrar package should be fixed. It is missing InstallDev section!

It makes sense with the libunrar.so reference but what about requirement of having complete unrar source tree referenced by --with-unrar? I don't know which files rar2fs actually uses from there.

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

Ok, so I've modified unrar Makefile adding the folowing:

define Build/InstallDev
        $(INSTALL_DIR) $(STAGING_DIR)/opt/include/unrar
        $(CP) $(PKG_BUILD_DIR)/*.hpp $(STAGING_DIR)/opt/include/unrar
        $(INSTALL_DIR) $(STAGING_DIR)/opt/lib
        $(CP) $(PKG_BUILD_DIR)/libunrar.so $(STAGING_DIR)/opt/lib
endef

It allowed me to to change CONFIGURE_ARGS in the rar2fs Makefile to this:

CONFIGURE_ARGS += \
        --with-unrar=$(STAGING_DIR)/opt/include/unrar

It works and definitely looks better but does it looks good by openwrt/entware standards? I'd like to omit --with-unrar but rar2fs will only look for unrar subdir inside it's own directory in that case:

withval=
AC_ARG_WITH([unrar],
   [AS_HELP_STRING([--with-unrar=PATH],
               [search PATH to unrar source [PATH=./unrar]]
   )],
   [], [])
if test x"$withval" != x; then
    if test x"$withval" != x"no"; then
        if test x"$withval" != x"yes"; then
           UNRAR_CPPFLAGS="-I"$with_unrar
        fi
    fi
else
    with_unrar="./unrar"
    UNRAR_CPPFLAGS="-I./unrar"
fi

And modifying configure script doesn't look like a right decision.

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

I've sent a pull request openwrt/packages#2060 in order to get Build/InstallDev define added to unrar package.

from entware-ng.

Noltari avatar Noltari commented on May 18, 2024

Hi @kolyagora,

I've fixed unrar in the following commit: openwrt/packages@082314c

Now you should be able to build rar2fs without further issues.
I modified your rar2fs Makefile in order to get it working:
https://gist.github.com/Noltari/cb796028a7083d5d9b17

Regards,
Álvaro.

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

I've made a package and sent a PR to Openwrt: openwrt/packages#2133. I've got no response still and since I don't use Openwrt itself I'd like to get the package added to Entware-ng. Should I send a PR to this repo or maybe https://github.com/Entware-ng/rtndev will be a better place?

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

@ryzhovau @zyxmon
Any advice?

from entware-ng.

ryzhovau avatar ryzhovau commented on May 18, 2024

I see no obstacles to add it, I think we can do it in next few days.
@zyxmon?

from entware-ng.

zyxmon avatar zyxmon commented on May 18, 2024

Why not?

from entware-ng.

ryzhovau avatar ryzhovau commented on May 18, 2024

Done. Please, provide a feedback.
Entware/entware-ng-rtndev@5bf9907

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

Thanks! I've successfully built it for x86-64 target, will test later.
One question though: what is the reason for adding --with-libiconv-prefix=$(ICONV_PREFIX) to CONFIGURE_ARGS?

from entware-ng.

ryzhovau avatar ryzhovau commented on May 18, 2024

We've faced some troubles with different iconv implementations before. They are very different in Glibc and uClibc, so we relying on full blown external libiconv which is proven as working. Please, test this package with some non-ascii file names inside archives, it should work on UTF-8 systems.

from entware-ng.

kolyagora avatar kolyagora commented on May 18, 2024

I confirm it works well with Cyrillic file names inside archives.

from entware-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.