Category: ipkg

https://en.wikipedia.org/wiki/ipkg

  • the GNU packages that I need most seriously on my Synology NAS

    CAVEAT: In 2017 I started using opkg (Entware-NG) instead of ipkg (optware). This document may not be updated entirely to reflect the new circumstances.

    theses are the GNU packages I seriously need on my Synology NAS (there is actually more than one …):

    $ sudo opkg list_installed
    bash - A bourne style shell.
    coreutils - Bunch of heavyweight *nix core utilities.
    diffutils - contains gnu diff, cmp, sdiff and diff3 to display differences between and among text files.
    exif - A small command-line utility to show and change EXIF information in JPEG files. // entware-ng does not have it
    file - Ubiquitous file identification utility.
    findutils - File finding utilities.
    gcc - The GNU Compiler Collection.
    ghostscript - … // includes ps2pdf
    gkrellmd - Gkrellm is a utility to display system stats (cpu, processes, memory,..) in a nice little window. // server component
    glib - The GLib library of C routines.
    grep - Global regular expression parser.
    gzip - GNU Zip data compression program. // provides: zless, zgrep, …
    iconv - Character set conversion utility
    less - Less file browser.
    make - examines files and runs commands necessary for compilation.
    nail - command-line email-client supporting POP3, IMAP, SMTP, …
    perl-text-csv_xs - Text comma-separated values manipulation routines.
    perlbase-cpan - CPAN perl module. // will install lots of other useful CPAN modules
    poppler-utils – … // includes pdftohtml; better than the xpdf package
    procps - PROCPS System Utilities.
    psmisc - A set of some small useful utilities that use the proc filesystem.
    rcs - The Revision Control System (RCS) manages multiple revisions of files.
    rsync - fast remote file copy program (like rcp).
    unzip – …
    vim - Yet another version of the vi editor.
    wget - A network utility to retrieve files from the Web.
    # I assume these ones get installed indirectly:
    pkgconfig - Package configuration tool.
    util-linux - A suite of essential utilities for any Linux system.
    # a few more get installed "indirectly" for sure…

    And BTW occasionally you want to do this:

    # update list of available packages:
    $ sudo opkg update
    # upgrade all installed packages to latest version:
    $ sudo opkg upgrade

    “Even” on your NAS you may want to keep source controlled text notes, that’s why even good old RCS may make sense.

    Maybe it’s worth installing the “Toolchain” according to this description:

    $ sudo ipkg list | fgrep optware-devel
    optware-devel - This is a meta package that bundles all the packages required for optware native development. When fully functional, it should …

  • the regular commands for updating your Synology IPKG installation

    # is /volume1/@optware symlinked to /opt ?
    $ ~/bin/sl /opt
    $ ln -s /volume1/@optware /opt
    $ export PATH=/opt/bin:$PATH

    If /volume1/@optware is not there at all, go to http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc

    johayek@hayekw $ ssh -A root@DiskStation
    DiskStationM> ipkg update
    DiskStationM> ipkg upgrade
    DiskStationM> ipkg install foobar
    DiskStationM> ipkg list
    DiskStationM> ipkg list_installed
    

    The packages I am interested in:

    DiskStation> ipkg list_installed 
    bash - …
    coreutils - …
    diffutils - …
    file - …
    findutils - …
    less - …
    man - …
    mlocate - …
    ncurses - …
    ncursesw - …
    rcs - …
    rsync - …
    vim - …
    wget - …
    py27-mercurial - …
  • (cross) development toolchain for the Synology DiskStations (DS213+, DS112+, …) – which CPUs do they use?

    The gcc supplied by ipkg (for this model) is an ancient 3.4.6, apparently so outdated, that you cannot configure and compile “current” sources, at least neither a current rsync nor a current gcc.

    I guess I should go for Synology’s own toolchain for the DS213+. Where do they supply that? At www.synology.com > Support > Developers > “Request GPL Source” they point you to sourceforge.net/projects/dsgpl/. Looks like EnvDeploy inside that tarball is the starting point.

    According to the “Synology NAS Server 3rd-Party Apps Integration Guide.pdf

    • the DS213+ has a “Freescale QorIQ P1022”; /proc/cpuinfo calls the CPU an e500v2, that’s a kind of PowerPC; the toolchain set-up scripts calls it “qoriq“;
    • and the DS112+ has a “Marvell 6281” or a “Marvell 6282”; /proc/cpuinfo calls the CPU a “Feroceon 88FR131 rev 1 (v5l)”, that’s an ARM processor; the toolchain set-up script calls it “6281“;

    To be continued …

  • the IPKG optware development toolchain for Synology DiskStations

    Recently I found IPKG actually got abandoned, and the IPKG Perl on one of my Synology DiskStations wasn’t really functional at all (some broken dependency on a library to be loaded dynamically).
    That really frustrated me for a short period. Now I installed the IPKG optware-devel (compilation toolchain) and esp. gcc. Downloaded rsync sources, proceeded “as usually” with GNU sources, and it simply works. That’s phantastic. I have really been worried for quite a while with that restricted Synology provided rsync, and the IPKG rsync didn’t really comfort me there, so having “my own” rsync is really a nice thing. Next thing will be compiling my own Perl; and I will even be able to install CPAN modules with C sources, as I even have a C compiler.

    Actually I should consider bootstrapping gcc, the GNU C compiler, because gcc-4.2.3 is a little outdated. gcc for my other DiskStation is even older, it’s a gcc-3.x. But than those gcc-s create code, that runs on these DiskStations, and not really bad.

    Looks like my Synology DiskStations even work well as development systems.

  • my new “mobile NAS”: Synology DS112+

    Installation procedure from CD-ROM:
    • you are starting with a DiskStation with a bare disk, i.e. no DSM (the DS Management system)
    • mount the supplied CD-ROM
    • mount DSAssistant-SYNOLOGY_….dmg from the CD-ROM
    • run the assistant App from there
    • the assistant App helps you installing the DSM, either from a  DSM_DS112+_….pat file (around 40 MB large) on the CD-ROM (it comes with DSM-4.1) or from a file you download from the Synology website (bleeding edge: DSM-4.3)
    • that includes formatting the hard disk
    Installation procedure following following the quick set up leaflet:
    • surf to find.synology.com
    • it is meant to discover all reachable Synology DiskStations
    • in this situation it does not find the DiskStation in question (running a DSM)
    • it points you to DSAssistant-SYNOLOGY_….dmg, to be downloaded from the Synology website
    • mount the downloaded DSAssistant-SYNOLOGY_….dmg
    • run the assistant App from there
    Because I had temporary trouble accessing the supplied CD-ROM, I had to download the DSAssistant…, but I used the DSM-4.1 on the CD-ROM. That decision was unreasonable and done a little too fast, as I seriously intended to operate using DSM-4.3. So in the meantime I downloaded DSM-4.3, and after having set up DSM-4.1 entirely and properly, I set up DSM-4.3.
    Further steps:
    • setting up a personal user account
    • allowing SSH access
    • SSH log-in in using the root account
    • modifying /etc/passwd to allow shell login for the user accounts in question (the resp. record has a “nologin” instead of a proper shell path)
    Further steps:
    • I followed the instructions listed in my own “my new NAS (…): Synology DS213+” (taken from somewhere else and my own experience)
    • install the ipkg installation system
    • install a proper rsync through ipkg; I will have to call this rsync as /opt/bin/rsync from now on
    • “standard standard” installation is broken for the DS112+, but the wiki page describes the actual standard procedure including a fix in some bootstrap.sh
    • commenting out the standard PATH setting in ~root/.profile and ~MY_ACCOUNT/.profile
    • my first personal rsync-s to the DiskStation
  • “rsync over ssh” to a Synology NAS – IPKG, opkg

    Nota Bene / before:

    • This is the text, that helps me personally re-installing rsync, whenever it magically disappears, maybe caused by an DSM update.
    • True, I should bring a little structure into this article.
    • I never ever care about rsyncd, as I am doing “rsync over ssh”;  any activity suggested regarding rsyncd does not concern me. (But then sometimes I am misled, and I erroneously do invest time in false paths, and I do get into problems that are actually rsyncd-related.)
    • I have my own ways of backing up data.
    • I have my own ideas of keeping data long term outside my computer’s built-in disks.

    The Synology system provided rsync is not for me. It’s somehow modified and spoilt.

    Well, it’s not only me experiencing weird effects with the “built-in” rsync. And I think, quite a few of the answers to that forum article do not quite fit at all.

    The details of the case:

    • “rsync over ssh” does not use the remote rsync daemon at all, i.e. no rsyncd.conf applies
    • it’s not unlikely, that these rsync problems have to do with a Synology special version of rsync
    • after this: “DiskStation> /usr/syno/etc.defaults/rc.d/S84rsyncd.sh stop”, the error message does not change, so it’s really not an “rsync daemon” issue, as that one is no longer running
    I fixed this problem by installing an rsync package provided on an Unslung Project repository for the CPU used within my Synology NAS. This brings dependencies on the Unslung Project, their IPKG installer, their Optware, their specific Synology repository. This kills me a little, to be honest.

    I mainly followed the “German Synology wiki” on IPKG. (As anxious as I am, I do keep a backup of that article at …/com/synology-wiki.de/ . Yes, I do have an idea, that this step alone is rather in vain.)
    So, well 1st I had to install IPKG itself.
    My CPU on the DS213+ is an e500 (actually: e500v2), so I went the e500 way in their description.
    My CPU on the DS112+ is a “Feroceon 88FR131 rev 1 (v5l)”, there is a note on how to deal with the DS112+, pls follow that one.
    My CPU on the DS115j is a “Marvell PJ4Bv7 Processor rev 1 (v7l)”, still a Feroceon, but a little hidden; the Feroceon check should be changed to check for Marvell instead; …

    Then I installed the rsync package provided by IPKG.

    An entry for /etc/rc.optware got created in /etc/rc.local, and they suggest to remove it, and I did that.
    I am not sure, it concerns me at all, as I mention “my” rsync on the NAS by full path on my command lines outside the NAS.

    Now my only minor problem with the “alternative rsync” is, that I have to specify the remote rsync on my local rsync command lines like this: “–rsync-path=/opt/bin/rsync”. That’s a PITA, but that’s not too hard.

    Update 2013-08-31: en.wikipedia.org/wiki/Ipkg says IPKG was discontinued. en.wikipedia.org/wiki/Opkg is the follower, code.google.com/p/opkg/, but it hasn’t really taken off.

  • wikis, forums and repositories for the Synology DiskStations and Routers

    Update 2016-01-27: This article tells you what to do: www.synology-wiki.de/index.php/IPKG. But actually not all steps are obligatory, and that’s a little hard to recognise at first sight.

  • my new NAS (and so much more): Synology DS213+

    DS213+ Products – Synology Inc. Network Attached Storage

    The box makes itself known as diskstation.local resp. DiskStation on my LAN. (Reliability …)

    Of course it deserves a “1 Gbit/s” on my FRITZ!Box.

    The box’s OS is BusyBox; here are a few more details:

    DiskStation> uname -a
    Linux DiskStation 2.6.32.12 #2668 SMP Tue Dec 11 13:01:16 CST 2012 ppc GNU/Linux synology_qoriq_213+

    I enabled SSH access for my personal user account rather soon, but the SSH login was not instantly successful. I tried “ssh -v”, and from there the login seriously looked, as if it was almost successful. My web research wasn’t successful either. Rather desperately I enabled “telnet access”; I tried to log in, and this was the result:

    login: can’t run /sbin/nologin: No such file or directory

    It was clear then, that the default shell in the /etc/passwd entry for my user account was in my way /sbin/nologin so far. I made /bin/ash the default shell and everything was fine. Of course, I disabled telnet access again thereafter. And of course, once I added “nologin” to my web query, I found a few articles describing the issue.

    SCP works; “rsync over ssh” (with my personal user account) does not work yet:

    $ rsync -va –rsh=’ssh -l root’ /etc/motd diskstation:tmp/ # works$ rsync -va /etc/motd diskstation:tmp/ # fails
    sending incremental file list
    ERROR: module is read only
    rsync error: syntax or usage error (code 1) at main.c(1034) [Receiver=3.0.8]
    rsync: connection unexpectedly closed (9 bytes received so far) [sender]
    rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.8]

    Fiddling with /etc/ssh/sshd_config – I really don’t know, what to change in order to overcome this obstacle.

    Perl is not part of its standard equipment, but Python apparently is,

    Through their Download Center I found this FTP server link. You can find various software for their boxes on their. There are also Perl installation packages, but the ones I tried are not for the current firmware release of “my” box, and in a way I am not up for an upgrade to beta software for my NAS.

    (For now I summarised here everything I have tried so far, so I will be able to procede from here.)

    A few more links:

    There are suggestions on the wiki(s) to install ipkg (yet another packaging system, not officially supported by Synology), and to install another rsync through ipkg. I may consider this, but I am not yet sure. I am quite able to use rsync (over ssh) as user root, but I am not with my personal account. I have no clue, what rights it needs, to allow my personal account to work as smoothly as user root. (To Be Solved!)

    To be continued …