pax_global_header00006660000000000000000000000064124713560550014522gustar00rootroot0000000000000052 comment=3e69117b708114924531e2ef2ac5ea6c1e96dba1 ginger-1.3.0.1/000077500000000000000000000000001247135605500131355ustar00rootroot00000000000000ginger-1.3.0.1/.gitignore000066400000000000000000000005431247135605500151270ustar00rootroot00000000000000*.pyc *~ .*.swp Makefile Makefile.in aclocal.m4 autom4te.cache build-aux/config.guess build-aux/config.sub build-aux/install-sh build-aux/missing build-aux/py-compile config.log config.status configure ginger-*.tar.gz ginger.spec mo/ po/POTFILES po/en_US.gmo po/gen-pot po/pt_BR.gmo po/stamp-po po/zh_CN.gmo rpm contrib/make-deb.sh contrib/DEBIAN/control ginger-1.3.0.1/ABOUT-NLS000066400000000000000000002671331247135605500144000ustar00rootroot000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl' library and will decide to use it. If not, you may have to to use the `--with-libintl-prefix' option to tell `configure' where to look for it. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of June 2010. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca +--------------------------------------------------+ a2ps | [] [] | aegis | | ant-phone | | anubis | | aspell | [] [] | bash | | bfd | | bibshelf | [] | binutils | | bison | | bison-runtime | [] | bluez-pin | [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | | dfarc | | dialog | [] [] | dico | | diffutils | [] | dink | | doodle | | e2fsprogs | [] | enscript | [] | exif | | fetchmail | [] | findutils | [] | flex | [] | freedink | | gas | | gawk | [] [] | gcal | [] | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] [] | gettext-tools | [] [] | gip | [] | gjay | | gliv | [] | glunarclock | [] [] | gnubiff | | gnucash | [] | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | | gold | | gpe-aerial | | gpe-beam | | gpe-bluetooth | | gpe-calendar | | gpe-clock | [] | gpe-conf | | gpe-contacts | | gpe-edit | | gpe-filemanager | | gpe-go | | gpe-login | | gpe-ownerinfo | [] | gpe-package | | gpe-sketchbook | | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] | gpe-today | [] | gpe-todo | | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | [] [] | gsasl | | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] [] [] | gtick | | gtkam | [] | gtkorphan | [] | gtkspell | [] [] [] | gutenprint | | hello | [] | help2man | | hylafax | | idutils | | indent | [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | | iso_639 | [] [] [] [] | iso_639_3 | | jwhois | | kbd | | keytouch | [] | keytouch-editor | | keytouch-keyboa... | [] | klavaro | [] | latrine | | ld | [] | leafpad | [] [] | libc | [] [] | libexif | () | libextractor | | libgnutls | | libgpewidget | | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | [] | libidn | | lifelines | | liferea | [] [] | lilypond | | linkdr | [] | lordsawar | | lprng | | lynx | [] | m4 | | mailfromd | | mailutils | | make | | man-db | | man-db-manpages | | minicom | | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | | psmisc | | pspp | [] | pwdutils | | radius | [] | recode | [] [] | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] [] | sed | [] [] | sharutils | [] [] | shishi | | skencil | | solfege | | solfege-manual | | soundtracker | | sp | | sysstat | | tar | [] | texinfo | | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] [] | wyslij-po | | xchat | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] | +--------------------------------------------------+ af am an ar as ast az be be@latin bg bn_IN bs ca 6 0 1 2 3 19 1 10 3 28 3 1 38 crh cs da de el en en_GB en_ZA eo es et eu fa +-------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] () | anubis | [] [] | aspell | [] [] [] [] [] | bash | [] [] [] | bfd | [] | bibshelf | [] [] [] | binutils | [] | bison | [] [] | bison-runtime | [] [] [] [] | bluez-pin | [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] [] [] | cflow | [] [] | clisp | [] [] [] [] | coreutils | [] [] [] [] | cpio | | cppi | | cpplib | [] [] [] | cryptsetup | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] | dink | [] [] [] | doodle | [] | e2fsprogs | [] [] [] | enscript | [] [] [] | exif | () [] [] | fetchmail | [] [] () [] [] [] | findutils | [] [] [] | flex | [] [] | freedink | [] [] [] | gas | [] | gawk | [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] [] | gip | [] [] [] [] | gjay | [] | gliv | [] [] [] | glunarclock | [] [] | gnubiff | () | gnucash | [] () () () () | gnuedu | [] [] | gnulib | [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] [] [] | gpe-edit | [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] () [] [] [] | gprof | [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] | grub | [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] () [] | gtkam | [] [] () [] [] | gtkorphan | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] [] [] | hello | [] [] [] [] | help2man | [] | hylafax | [] [] | idutils | [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] [] [] [] () [] [] [] () | iso_3166_2 | () | iso_4217 | [] [] [] () [] [] | iso_639 | [] [] [] [] () [] [] | iso_639_3 | [] | jwhois | [] | kbd | [] [] [] [] [] | keytouch | [] [] | keytouch-editor | [] [] | keytouch-keyboa... | [] | klavaro | [] [] [] [] | latrine | [] () | ld | [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | [] [] | libgphoto2 | [] () | libgphoto2_port | [] () [] | libgsasl | | libiconv | [] [] [] [] [] | libidn | [] [] [] | lifelines | [] () | liferea | [] [] [] [] [] | lilypond | [] [] [] | linkdr | [] [] [] | lordsawar | [] | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] [] | man-db | | man-db-manpages | | minicom | [] [] [] [] | mkisofs | | myserver | | nano | [] [] [] | opcodes | [] [] | parted | [] [] | pies | | popt | [] [] [] [] [] | psmisc | [] [] [] | pspp | [] | pwdutils | [] | radius | [] | recode | [] [] [] [] [] [] | rosegarden | () () () | rpm | [] [] [] | rush | | sarg | | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | | skencil | [] () [] | solfege | [] [] [] | solfege-manual | [] [] | soundtracker | [] [] [] | sp | [] | sysstat | [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] | tin | [] [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] | vice | () () | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] | wyslij-po | | xchat | [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ crh cs da de el en en_GB en_ZA eo es et eu fa 5 64 105 117 18 1 8 0 28 89 18 19 0 fi fr ga gl gu he hi hr hu hy id is it ja ka kn +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] [] | ant-phone | [] [] | anubis | [] [] [] [] | aspell | [] [] [] [] | bash | [] [] [] [] | bfd | [] [] [] | bibshelf | [] [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] | buzztard | [] | cflow | [] [] [] | clisp | [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] | cppi | [] [] | cpplib | [] [] [] | cryptsetup | [] [] [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] [] [] [] [] [] | dink | [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] | freedink | [] [] [] | gas | [] [] | gawk | [] [] [] [] () [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] [] [] | gjay | [] | gliv | [] () | glunarclock | [] [] [] [] | gnubiff | () [] () | gnucash | () () () () () [] | gnuedu | [] [] | gnulib | [] [] [] [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gold | [] [] | gpe-aerial | [] [] [] | gpe-beam | [] [] [] [] | gpe-bluetooth | [] [] [] [] | gpe-calendar | [] [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] [] | gpe-go | [] [] [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] | gpe-todo | [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] [] | gpsdrive | [] [] [] | gramadoir | [] [] [] | grep | [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkorphan | [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | gutenprint | [] [] [] [] | hello | [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] | iso_15924 | [] () [] [] | iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | () [] [] [] | iso_4217 | [] () [] [] [] [] | iso_639 | [] () [] [] [] [] [] [] [] | iso_639_3 | () [] [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] [] [] [] | keytouch-editor | [] [] [] [] [] | keytouch-keyboa... | [] [] [] [] [] | klavaro | [] [] | latrine | [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] | libidn | [] [] [] [] | lifelines | () | liferea | [] [] [] [] | lilypond | [] [] | linkdr | [] [] [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] [] | man-db | [] [] | man-db-manpages | [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] [] | myserver | | nano | [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] [] | pies | | popt | [] [] [] [] [] [] [] [] [] | psmisc | [] [] [] | pspp | | pwdutils | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () () () () | rpm | [] [] | rush | | sarg | [] | screem | [] [] | scrollkeeper | [] [] [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] | shishi | [] | skencil | [] | solfege | [] [] [] [] | solfege-manual | [] [] | soundtracker | [] [] | sp | [] () | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux-ng | [] [] [] [] [] [] | vice | () () () | vmm | [] | vorbis-tools | [] | wastesedge | () () | wdiff | [] | wget | [] [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] | +----------------------------------------------------+ fi fr ga gl gu he hi hr hu hy id is it ja ka kn 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne +-----------------------------------------------+ a2ps | [] | aegis | | ant-phone | | anubis | [] [] | aspell | [] | bash | | bfd | | bibshelf | [] [] | binutils | | bison | [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | bombono-dvd | | buzztard | | cflow | | clisp | | coreutils | [] | cpio | | cppi | | cpplib | | cryptsetup | | dfarc | [] | dialog | [] [] [] [] [] | dico | | diffutils | [] [] | dink | | doodle | | e2fsprogs | | enscript | | exif | [] | fetchmail | | findutils | | flex | | freedink | [] | gas | | gawk | | gcal | | gcc | | gettext-examples | [] [] [] [] | gettext-runtime | [] | gettext-tools | [] | gip | [] [] | gjay | | gliv | | glunarclock | [] | gnubiff | | gnucash | () () () () | gnuedu | | gnulib | | gnunet | | gnunet-gtk | | gnutls | [] | gold | | gpe-aerial | [] | gpe-beam | [] | gpe-bluetooth | [] [] | gpe-calendar | [] | gpe-clock | [] [] [] [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] | gpe-timesheet | [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | | gramadoir | | grep | | grub | | gsasl | | gss | | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | | gtick | | gtkam | [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | | hello | [] [] [] | help2man | | hylafax | | idutils | | indent | | iso_15924 | [] [] | iso_3166 | [] [] () [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] | iso_639 | [] [] | iso_639_3 | [] | jwhois | [] | kbd | | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | klavaro | [] | latrine | [] | ld | | leafpad | [] [] [] | libc | [] | libexif | | libextractor | | libgnutls | [] | libgpewidget | [] [] | libgpg-error | | libgphoto2 | | libgphoto2_port | | libgsasl | | libiconv | | libidn | | lifelines | | liferea | | lilypond | | linkdr | | lordsawar | | lprng | | lynx | | m4 | | mailfromd | | mailutils | | make | [] | man-db | | man-db-manpages | | minicom | [] | mkisofs | | myserver | | nano | [] [] | opcodes | | parted | | pies | | popt | [] [] [] | psmisc | | pspp | | pwdutils | | radius | | recode | | rosegarden | | rpm | | rush | | sarg | | screem | | scrollkeeper | [] [] | sed | | sharutils | | shishi | | skencil | | solfege | [] | solfege-manual | | soundtracker | | sp | | sysstat | [] | tar | [] | texinfo | [] | tin | | unicode-han-tra... | | unicode-transla... | | util-linux-ng | | vice | | vmm | | vorbis-tools | | wastesedge | | wdiff | | wget | [] | wyslij-po | | xchat | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +-----------------------------------------------+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +---------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] | aegis | [] [] [] | ant-phone | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] | bash | [] [] | bfd | [] | bibshelf | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] | bombono-dvd | [] () | buzztard | [] [] | cflow | [] | clisp | [] [] | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cppi | [] | cpplib | [] | cryptsetup | [] | dfarc | [] | dialog | [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] [] | dink | () | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | exif | [] [] [] () [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] | gas | | gawk | [] [] [] [] | gcal | | gcc | [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] | gip | [] [] [] [] [] | gjay | | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | [] () | gnucash | [] () () () | gnuedu | [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gnutls | [] [] | gold | | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-bluetooth | [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] [] | gphoto2 | [] [] [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | gutenprint | [] [] | hello | [] [] [] [] | help2man | [] [] | hylafax | [] | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | [] [] [] [] | iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] [] [] | keytouch-editor | [] [] [] | keytouch-keyboa... | [] [] [] | klavaro | [] [] | latrine | [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] () [] | libextractor | | libgnutls | [] [] | libgpewidget | [] [] [] | libgpg-error | [] [] | libgphoto2 | [] [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] | lifelines | [] [] | liferea | [] [] [] [] [] () () [] | lilypond | [] | linkdr | [] [] [] | lordsawar | | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | | nano | [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | pies | [] | popt | [] [] [] [] | psmisc | [] [] [] | pspp | [] [] | pwdutils | [] | radius | [] [] [] | recode | [] [] [] [] [] [] [] [] | rosegarden | () () | rpm | [] [] [] | rush | [] [] | sarg | | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] [] [] [] | solfege-manual | [] [] [] | soundtracker | [] | sp | | sysstat | [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | [] | unicode-han-tra... | | unicode-transla... | | util-linux-ng | [] [] [] [] [] | vice | [] | vmm | [] | vorbis-tools | [] [] | wastesedge | [] | wdiff | [] [] | wget | [] [] [] [] [] [] [] | wyslij-po | [] [] [] | xchat | [] [] [] [] [] [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW +---------------------------------------------------+ a2ps | [] [] [] [] [] | 27 aegis | [] | 9 ant-phone | [] [] [] [] | 9 anubis | [] [] [] [] | 15 aspell | [] [] [] | 20 bash | [] [] [] | 12 bfd | [] | 6 bibshelf | [] [] [] | 16 binutils | [] [] | 8 bison | [] [] | 12 bison-runtime | [] [] [] [] [] [] | 29 bluez-pin | [] [] [] [] [] [] [] [] | 37 bombono-dvd | [] | 4 buzztard | [] | 7 cflow | [] [] [] | 9 clisp | | 10 coreutils | [] [] [] [] | 22 cpio | [] [] [] [] [] [] | 13 cppi | [] [] | 5 cpplib | [] [] [] [] [] [] | 14 cryptsetup | [] [] | 7 dfarc | [] | 9 dialog | [] [] [] [] [] [] [] | 30 dico | [] | 2 diffutils | [] [] [] [] [] [] | 30 dink | | 4 doodle | [] [] | 7 e2fsprogs | [] [] [] | 11 enscript | [] [] [] [] | 17 exif | [] [] [] | 16 fetchmail | [] [] [] | 17 findutils | [] [] [] [] [] | 20 flex | [] [] [] [] | 15 freedink | [] | 10 gas | [] | 4 gawk | [] [] [] [] | 18 gcal | [] [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] [] | 34 gettext-runtime | [] [] [] [] [] [] [] | 29 gettext-tools | [] [] [] [] [] [] | 22 gip | [] [] [] [] | 22 gjay | [] | 3 gliv | [] [] [] | 14 glunarclock | [] [] [] [] [] | 19 gnubiff | [] [] | 4 gnucash | () [] () [] () | 10 gnuedu | [] [] | 7 gnulib | [] [] [] [] | 16 gnunet | [] | 1 gnunet-gtk | [] [] [] | 5 gnutls | [] [] [] | 10 gold | [] | 4 gpe-aerial | [] [] [] | 18 gpe-beam | [] [] [] | 19 gpe-bluetooth | [] [] [] | 13 gpe-calendar | [] [] [] [] | 12 gpe-clock | [] [] [] [] [] | 28 gpe-conf | [] [] [] [] | 20 gpe-contacts | [] [] [] | 17 gpe-edit | [] [] [] | 12 gpe-filemanager | [] [] [] [] | 16 gpe-go | [] [] [] [] [] | 25 gpe-login | [] [] [] | 11 gpe-ownerinfo | [] [] [] [] [] | 25 gpe-package | [] [] [] | 13 gpe-sketchbook | [] [] [] | 20 gpe-su | [] [] [] [] [] | 30 gpe-taskmanager | [] [] [] [] [] | 29 gpe-timesheet | [] [] [] [] [] | 25 gpe-today | [] [] [] [] [] [] | 30 gpe-todo | [] [] [] [] | 17 gphoto2 | [] [] [] [] [] | 24 gprof | [] [] [] | 15 gpsdrive | [] [] [] | 11 gramadoir | [] [] [] | 11 grep | [] [] [] | 10 grub | [] [] [] | 14 gsasl | [] [] [] [] | 14 gss | [] [] [] | 11 gst-plugins-bad | [] [] [] [] | 26 gst-plugins-base | [] [] [] [] [] | 24 gst-plugins-good | [] [] [] [] | 24 gst-plugins-ugly | [] [] [] [] [] | 29 gstreamer | [] [] [] [] | 22 gtick | [] [] [] | 13 gtkam | [] [] [] | 20 gtkorphan | [] [] [] | 14 gtkspell | [] [] [] [] [] [] [] [] [] | 45 gutenprint | [] | 10 hello | [] [] [] [] [] [] | 21 help2man | [] [] | 7 hylafax | [] | 5 idutils | [] [] [] [] | 17 indent | [] [] [] [] [] [] | 30 iso_15924 | () [] () [] [] | 16 iso_3166 | [] [] () [] [] () [] [] [] () | 53 iso_3166_2 | () [] () [] | 9 iso_4217 | [] () [] [] () [] [] | 26 iso_639 | [] [] [] () [] () [] [] [] [] | 38 iso_639_3 | [] () | 8 jwhois | [] [] [] [] [] | 16 kbd | [] [] [] [] [] | 15 keytouch | [] [] [] | 16 keytouch-editor | [] [] [] | 14 keytouch-keyboa... | [] [] [] | 14 klavaro | [] | 11 latrine | [] [] [] | 10 ld | [] [] [] [] | 11 leafpad | [] [] [] [] [] [] | 33 libc | [] [] [] [] [] | 21 libexif | [] () | 7 libextractor | [] | 1 libgnutls | [] [] [] | 9 libgpewidget | [] [] [] | 14 libgpg-error | [] [] [] | 9 libgphoto2 | [] [] | 8 libgphoto2_port | [] [] [] [] | 14 libgsasl | [] [] [] | 13 libiconv | [] [] [] [] | 21 libidn | () [] [] | 11 lifelines | [] | 4 liferea | [] [] [] | 21 lilypond | [] | 7 linkdr | [] [] [] [] [] | 17 lordsawar | | 1 lprng | [] | 3 lynx | [] [] [] [] | 17 m4 | [] [] [] [] | 19 mailfromd | [] [] | 3 mailutils | [] | 5 make | [] [] [] [] | 21 man-db | [] [] [] | 8 man-db-manpages | | 4 minicom | [] [] | 16 mkisofs | [] [] | 9 myserver | | 0 nano | [] [] [] [] | 21 opcodes | [] [] [] | 11 parted | [] [] [] [] [] | 15 pies | [] [] | 3 popt | [] [] [] [] [] [] | 27 psmisc | [] [] | 11 pspp | | 4 pwdutils | [] [] | 6 radius | [] [] | 9 recode | [] [] [] [] | 28 rosegarden | () | 0 rpm | [] [] [] | 11 rush | [] [] | 4 sarg | | 1 screem | [] | 3 scrollkeeper | [] [] [] [] [] | 27 sed | [] [] [] [] [] | 30 sharutils | [] [] [] [] [] | 22 shishi | [] | 3 skencil | [] [] | 7 solfege | [] [] [] [] | 16 solfege-manual | [] | 8 soundtracker | [] [] [] | 9 sp | [] | 3 sysstat | [] [] | 15 tar | [] [] [] [] [] [] | 23 texinfo | [] [] [] [] [] | 17 tin | | 4 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux-ng | [] [] [] [] | 20 vice | () () | 1 vmm | [] | 4 vorbis-tools | [] | 6 wastesedge | | 2 wdiff | [] [] | 7 wget | [] [] [] [] [] | 26 wyslij-po | [] [] | 8 xchat | [] [] [] [] [] [] | 36 xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 xkeyboard-config | [] [] [] | 22 +---------------------------------------------------+ 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If June 2010 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.5 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. ginger-1.3.0.1/API.json000066400000000000000000000153741247135605500144530ustar00rootroot00000000000000{ "$schema": "http://json-schema.org/draft-03/schema#", "title": "Ginger Plugin API", "description": "JSON schema for Ginger Plugin API", "type": "object", "properties": { "firmware_update": { "type": "object", "properties": { "path": { "description": "The full path to the firmware archive", "type": "string", "required": true }, "overwrite-perm-ok": { "description": "Give permission to overwrite the permanent image area if necessary. Valid inputs: 'True'|'False' Default is True, if unspecified.", "type": "boolean", "required": false } } }, "firmware_commit": { "type": "null", "properties": { } }, "firmware_reject": { "type": "null", "properties": { } }, "powerprofile_update": { "type": "object", "properties": { "active": { "description": "State of the profile", "type": "boolean", "required": true } } }, "users_create": { "type": "object", "error": "GINUSER0001E", "properties": { "name": { "description": "The login name of the new user", "type": "string", "required": true, "error": "GINUSER0002E" }, "password": { "description": "The new user password", "type": "string", "required": true, "error": "GINUSER0003E" }, "group": { "description": "The group name of the new user", "type": "string", "required": true, "error": "GINUSER0004E" }, "profile": { "description": "The profile of the new user", "type": "string", "pattern": "^kimchiuser|virtuser|admin$", "required": true, "error": "GINUSER0005E" } } }, "network_update": { "type": "object", "properties": { "nameservers": { "description": "DNS Servers", "type": "array", "items": { "type": "string", "format": "ip-address" }, "minItems": 1, "uniqueItems": true, "error": "GINNET0005E" }, "gateway": { "description": "Default network gateway", "type": "string", "format": "ip-address", "error": "GINNET0008E" } } }, "interface_update": { "type": "object", "properties": { "ipaddr": { "description": "Interface IP address", "type": "string", "required": true, "error": "GINNET0006E" }, "netmask": { "description": "Interface netmask", "type": "string", "required": true, "error": "GINNET0007E" } } }, "archives_create": { "type": "object", "properties": { "description": { "description": "Comments for the archive", "type": "string", "maxLength": 4096, "error": "GINHBK0004E" }, "include": { "description": "Array of paths or patterns to include.", "type": "array", "uniqueItems": true, "error": "GINHBK0005E", "items": { "description": "Full path of a directory or file, or a pattern.", "minLength": 1, "maxLength": 1024, "type": "string", "error": "GINHBK0006E" } }, "exclude": { "description": "Array of paths or patterns to exclude.", "type": "array", "uniqueItems": true, "error": "GINHBK0005E", "items": { "description": "Full path of a directory or file, or a pattern.", "minLength": 1, "maxLength": 1024, "type": "string", "error": "GINHBK0006E" } } } }, "backup_discard_archives": { "type": "object", "properties": { "days_ago": { "description": "Discard all archives older than some days ago. -1 means don't count the days.", "type": "integer", "minimum": -1, "maximum": 65535, "required": true, "error": "GINHBK0007E" }, "counts_ago": { "description": "Discard all archives older than some counts ago. -1 means don't count the counts.", "type": "integer", "minimum": -1, "maximum": 65535, "required": true, "error": "GINHBK0008E" } } }, "ibm_sep_update":{ "type": "object", "properties": { "hostname": { "description": "Specifies the hostname of the system.", "type": "string", "required": true, "error": "GINSEP0001E" }, "port": { "description": "Specifies the port of the system.", "type": "string", "required": true, "error": "GINSEP0002E" }, "community": { "description": "Specifies the SNMP community.", "type": "string", "required": true, "error": "GINSEP0003E" } } } } } ginger-1.3.0.1/AUTHORS000066400000000000000000000005471247135605500142130ustar00rootroot00000000000000Adriano Botega Christy Perez Daniel Henrique Barboza Mark Wu Paulo Vital Rodrigo Trujillo Yu Xin Huo Zhou Zheng Sheng ginger-1.3.0.1/COPYING000066400000000000000000000004641247135605500141740ustar00rootroot00000000000000Ginger is distributed pursuant to the terms of two different licenses. The user interface (located in ui/ in this distribution) is governed by the Apache License version 2.0. The rest of this distribution is governed by the GNU Lesser General Public License version 2.1. See COPYING.LGPL and COPYING.ASL2. ginger-1.3.0.1/COPYING.ASL2000066400000000000000000000261361247135605500147000ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ginger-1.3.0.1/COPYING.LGPL000066400000000000000000000636421247135605500147400ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ginger-1.3.0.1/ChangeLog000066400000000000000000000342751247135605500147220ustar00rootroot00000000000000CHANGELOG ========= #### [1.3.0.1] #### * [0e1c801] Github #9, #10 and #12 fixes (Daniel Henrique Barboza) * [9a5567a] i18n.py: deleting the merge with kimchi messages (Daniel Henrique Barboza) * [a8a6514] Enhancing Power Management error messages (Daniel Henrique Barboza) * [8c5ea3a] ChangeLog file for Ginger (Daniel Henrique Barboza) * [4c81977] Make check fixes (Daniel Henrique Barboza) #### [ginger-1.3.0] #### * [0e4806c] Debian/Ubuntu packaging files (Daniel Henrique Barboza) * [23ded96] README: adding Ubuntu/Debian info. (Daniel Henrique Barboza) * [f0c3be7] models/ibm_sep.py: adding 'is_feature_available()' method (Daniel Henrique Barboza) * [c332517] models/interfaces.py: fixing an 'is not defined' error (Daniel Henrique Barboza) * [fd5c176] UI: Capabilities for ginger (wenwang@linux.vnet.ibm.com) * [b60e80a] Capabilities API: adding support to some existing models (Daniel Henrique Barboza) * [b911174] Adding capabilities API to Makefiles (Daniel Henrique Barboza) * [6441dbf] Adding new API: Capabilities (Daniel Henrique Barboza) * [8aa841f] Fix delete user return error (Rodrigo Trujillo) * [e8453fc] Have Firmware inherit from Object (christy@linux.vnet.ibm.com) * [b7589c6] Changing the network interfaces listing (Daniel Henrique Barboza) * [a7f2e08] UI: Ginger User Management (Wen Wang) * [b76a7e2] models/interfaces.py: removing ip/netmask on blank input (danielhb@linux.vnet.ibm.com) * [1e1011f] Add Ginger Help files (Rodrigo Trujillo) #### [ginger-1.2.1.1] #### * [a8bff3e] Packaging: Let Ginger Depend on Latest Kimchi (Zhou Zheng Sheng) * [3345353] Deal with bad hdd sensor data (christy@linux.vnet.ibm.com) * [6eb90a5] Bugfix: Make buttons display properly when the text is long (Wen Wang) * [e7ed072] Enhancement: Change the SEP status style from text to a status dot (Wen Wang) * [468149e] host-admin.js: disabling OK button when processing (danielhb@linux.vnet.ibm.com) * [daecbfc] Update Makefile.am to add autogen.sh in tarball. (Paulo Vital) * [3cc5181] Add timeout check for configuration backup (Zhou Zheng Sheng) * [9a3b682] Bugfix Takes time to activate tuned profile in "Power Options" (Wen Wang) * [db95b9e] IBM SEP bug fix: Update _get_subscribe info (Paulo Vital) * [eac260e] Bugfix: Change ginger's text for translation (wenwang@linux.vnet.ibm.com) * [1e1905b] UI: SEP(ESA) initial setup (Wen Wang) * [b6f83bc] IBM Serviceable Event Provider (SEP): Update build files (Paulo Vital) * [c5869b6] IBM Serviceable Event Provider (SEP): Backend support (Paulo Vital) * [66db9fd] IBM Serviceable Event Provider (SEP): Update configuration files (Paulo Vital) * [646a0c1] UI: Host sensors data visualization (Wen Wang) * [ea67e95] 'tuned' troubleshot information in README file (danielhb@linux.vnet.ibm.com) * [91ebfc3] Add sensors backend functionality (christy@linux.vnet.ibm.com) * [9e5dccc] Fix pyflakes and pep 8 errors (Zhou Zheng Sheng) * [4fac9cc] Updated .gitignore to Address Generated Files (hlwang@linux.vnet.ibm.com) * [5ce4a73] Adapt to new Kimchi authorization scheme (Zhou Zheng Sheng) #### [1.3.0.1] #### * [0e1c801] Github #9, #10 and #12 fixes (Daniel Henrique Barboza) * [9a5567a] i18n.py: deleting the merge with kimchi messages (Daniel Henrique Barboza) * [a8a6514] Enhancing Power Management error messages (Daniel Henrique Barboza) * [8c5ea3a] ChangeLog file for Ginger (Daniel Henrique Barboza) * [4c81977] Make check fixes (Daniel Henrique Barboza) * [0e4806c] Debian/Ubuntu packaging files (Daniel Henrique Barboza) * [23ded96] README: adding Ubuntu/Debian info. (Daniel Henrique Barboza) * [f0c3be7] models/ibm_sep.py: adding 'is_feature_available()' method (Daniel Henrique Barboza) * [c332517] models/interfaces.py: fixing an 'is not defined' error (Daniel Henrique Barboza) * [fd5c176] UI: Capabilities for ginger (wenwang@linux.vnet.ibm.com) * [b60e80a] Capabilities API: adding support to some existing models (Daniel Henrique Barboza) * [b911174] Adding capabilities API to Makefiles (Daniel Henrique Barboza) * [6441dbf] Adding new API: Capabilities (Daniel Henrique Barboza) * [8aa841f] Fix delete user return error (Rodrigo Trujillo) * [e8453fc] Have Firmware inherit from Object (christy@linux.vnet.ibm.com) * [b7589c6] Changing the network interfaces listing (Daniel Henrique Barboza) * [a7f2e08] UI: Ginger User Management (Wen Wang) * [b76a7e2] models/interfaces.py: removing ip/netmask on blank input (danielhb@linux.vnet.ibm.com) * [1e1011f] Add Ginger Help files (Rodrigo Trujillo) * [a8bff3e] Packaging: Let Ginger Depend on Latest Kimchi (Zhou Zheng Sheng) * [3345353] Deal with bad hdd sensor data (christy@linux.vnet.ibm.com) * [6eb90a5] Bugfix: Make buttons display properly when the text is long (Wen Wang) * [e7ed072] Enhancement: Change the SEP status style from text to a status dot (Wen Wang) * [468149e] host-admin.js: disabling OK button when processing (danielhb@linux.vnet.ibm.com) * [daecbfc] Update Makefile.am to add autogen.sh in tarball. (Paulo Vital) * [3cc5181] Add timeout check for configuration backup (Zhou Zheng Sheng) * [9a3b682] Bugfix Takes time to activate tuned profile in "Power Options" (Wen Wang) * [db95b9e] IBM SEP bug fix: Update _get_subscribe info (Paulo Vital) * [eac260e] Bugfix: Change ginger's text for translation (wenwang@linux.vnet.ibm.com) * [1e1905b] UI: SEP(ESA) initial setup (Wen Wang) * [b6f83bc] IBM Serviceable Event Provider (SEP): Update build files (Paulo Vital) * [c5869b6] IBM Serviceable Event Provider (SEP): Backend support (Paulo Vital) * [66db9fd] IBM Serviceable Event Provider (SEP): Update configuration files (Paulo Vital) * [646a0c1] UI: Host sensors data visualization (Wen Wang) * [ea67e95] 'tuned' troubleshot information in README file (danielhb@linux.vnet.ibm.com) * [91ebfc3] Add sensors backend functionality (christy@linux.vnet.ibm.com) * [9e5dccc] Fix pyflakes and pep 8 errors (Zhou Zheng Sheng) * [4fac9cc] Updated .gitignore to Address Generated Files (hlwang@linux.vnet.ibm.com) * [5ce4a73] Adapt to new Kimchi authorization scheme (Zhou Zheng Sheng) * [77a3b53] Removed all author references from Ginger files. (Paulo Vital) * [f19cf68] Changed the year of all IBM copyright mention to 2014. (Paulo Vital) * [28450db] Change project name in all files from Kimchi-ginger to Ginger. (Paulo Vital) * [a2ca125] Change build dependencies versions to support RHEL 6.X (Paulo Vital) * [70f03d2] i18n: GINNET0009E needs "err" key (Zhou Zheng Sheng) * [0054436] Add pt_BR and zh_CN translations (Zhou Zheng Sheng) * [ce61b51] Add Ginger i18n translation templates (Zhou Zheng Sheng) * [f951825] Adapt to new Kinger front-end i18n mechanism (Zhou Zheng Sheng) * [d669991] Kimchi-ginger: Declaration of Independence (Zhou Zheng Sheng) * [5a7baae] Kimchi-Ginger i18n support: added support and marked strings to translation. (Paulo Vital) * [cba117b] Add FW commit and reject capability. (Christy Perez) * [19d013e] UI: Rename kimchi.template to kimchi.substitute (Zhou Zheng Sheng) * [99ebf08] UI: List SAN Adapters (Yu Xin Huo) * [82f4432] Add /var/spool/cron to default host configuration backup paths (Zhou Zheng Sheng) * [cd0bdc9] Packaging: ship with models/sandapters.py (Zhou Zheng Sheng) * [4a3e80b] Power Profile Management - Front-end implementation (Yu Xin Huo) * [e9c3860] Only expose bare nics for configuration editing (Mark Wu) * [98db648] network configuration, interface, dns, gateway (Yu Xin Huo) * [5c45243] Change default gateway update API (Mark Wu) * [7d72d27] Backup Buttons Overlap when Labels are long (Yu Xin Huo) * [93dae50] Creates Ginger API documentation file (Rodrigo Trujillo) * [a4f2304] SAN adapters information (Rodrigo Trujillo) * [5656ca5] Host Backup: Sort the archive list returned to the front-end (Zhou Zheng Sheng) * [5ed91fc] Change labels for batch delete options of host config backup. (Paulo Vital) * [d87de90] Fix pep8 style issue in firmware.py (Mark Wu) * [475c722] Host Backup: Make Include and Exclude Paths Configurable (Zhou Zheng Sheng) * [cc4a3f8] Turn Off Caching of Dynamic Generated Contents (Zhou Zheng Sheng) * [c26b0a0] Host Backup: Refine Include and Exclude Rules (Zhou Zheng Sheng) * [f809f1f] Rework error messages reported when updating the Power FW. (Christy Perez) * [a1f74d2] Enable Kimchi authentication on ginger URI (Mark Wu) * [eb98f8a] host backup download: Use serve_file instead of internal redirect (Zhou Zheng Sheng) * [4fb60ae] Packaging: Add Makefile.am and RPM spec entries for Ginger UI files (Zhou Zheng Sheng) * [0d14203] Host Configuration Backup UI (Yu Xin Huo) * [7805a8a] Firmware Update UI (Yu Xin Huo) * [180396b] Improve host configuration backup back-end implementation (Zhou Zheng Sheng) * [e86bd3a] Fix the firmware image file name. (Christy Perez) * [7d889bf] Host Configuration Backup Back-end Implmentation (Zhou Zheng Sheng) * [b6b6e04] Adding the backend firmware-update functionality. (Christy Perez) * [4b3195e] Make ginger root app inherit from kimchi Root class (Mark Wu) * [2e382c5] RootModel: replace RootModel with kimchi.basemodel.BaseModel (Zhou Zheng Sheng) * [582742b] Users Management: Add support to profile and i18n translation (Rodrigo Trujillo) * [321e5f5] Automatic rollback network configuration on failure (Zhou Zheng Sheng) * [44202ea] Update host network interface configuration (Mark Wu) * [04e10b5] packaging: fix ginger plugin installing path (Zhou Zheng Sheng) * [9d7f45d] Power management backend: fixing 'no active profile' condition (Daniel Henrique Barboza) * [58ad969] Adapt to the change of kimchi exception refactoring (Mark Wu) * [872ab3c] Add path vars for ginger plugin (Mark Wu) * [4887cc1] Ginger users basic management back-end (Rodrigo Trujillo) * [07f7163] PowerManagement backend: changes in common ginger files (Daniel Henrique Barboza) * [aae0a9c] PowerManagement backend: controller, model and API changes (Daniel Henrique Barboza) * [64936c6] Ginger plugin structure files (Rodrigo Trujillo)ginger-1.3.0.1/INSTALL000066400000000000000000000000001247135605500141540ustar00rootroot00000000000000ginger-1.3.0.1/Makefile.am000066400000000000000000000051361247135605500151760ustar00rootroot00000000000000# # Ginger # # Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA SUBDIRS= po controls models ui contrib ACLOCAL_AMFLAGS = --install -I m4 PEP8_WHITELIST = \ controls \ models \ $(NULL) ginger_PYTHON = \ __init__.py \ ginger.py \ i18n.py \ $(NULL) gingerdir = $(pythondir)/kimchi/plugins/ginger confdir = $(sysconfdir)/kimchi/plugins.d dist_conf_DATA = ginger.conf EXTRA_DIST = \ API.json \ VERSION \ autogen.sh \ build-aux/config.rpath \ build-aux/pkg-version \ $(NULL) CLEANFILES = \ $(ginger_PYTHON:%.py=%.pyc) \ $(NULL) check-local: find . -path './.git' -prune -type f -o \ -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \ while read LINE; do echo "$$LINE"; false; done $(PEP8) --version $(PEP8) --filename '*.py,*.py.in' $(PEP8_WHITELIST) # # Packaging helpers # install-deb: install cp -R $(top_srcdir)/contrib/DEBIAN $(DESTDIR)/ deb: contrib/make-deb.sh $(top_srcdir)/contrib/make-deb.sh # Link built mo files in the source tree to enable use of translations from # within the source tree all-local: while read L && test -n "$$L"; do \ dir=mo/$$L/LC_MESSAGES ; \ $(MKDIR_P) $$dir ; \ ln -sf ../../../po/$$L.gmo $$dir/ginger.mo ; \ done < po/LINGUAS install-data-local: $(MKDIR_P) $(DESTDIR)$(gingerdir) $(INSTALL_DATA) API.json $(DESTDIR)$(gingerdir)/API.json rpm: dist ginger.spec $(MKDIR_P) rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS cp $(top_srcdir)/ginger.spec rpm/SPECS/ginger.spec cp $(DIST_ARCHIVES) rpm/SOURCES rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/ginger.spec ChangeLog: @if test -d .git; then \ $(top_srcdir)/build-aux/genChangelog --release > $@; \ fi VERSION: @if test -d .git; then \ git describe --abbrev=0 > $@; \ fi clean-local: rm -rf rpm .PHONY: rpm ChangeLog VERSION ginger-1.3.0.1/NEWS000066400000000000000000000000001247135605500136220ustar00rootroot00000000000000ginger-1.3.0.1/README000066400000000000000000000032241247135605500140160ustar00rootroot00000000000000Ginger ====== Ginger is an open source host management plugin to Kimchi, that provides an intuitive web panel with common tools for configuring and operating Linux systems. The current features include: + retreive system health (sensors) stats + user login account management, + network interface configuration, + configuration backup, + Power (ppc) firmware update, + Power policy management. Kimchi is an HTML5 based management tool for KVM. It is designed to make it as easy as possible to get started with KVM and create your first guest. - Note on Ubuntu/Debian: To run the source code in Ubuntu/Debian an extra package is required: $ sudo apt-get install python-libuser - Notes on Power policy management feature: The power policy management feature uses the 'tuned' service to control the power policies of the host. Problems have been reported with this package, depending on the host configuration, such as SELinux denials and trouble to communicate using DBUS with the 'tuned' service started from systemd. If you find any problems with the power policy management feature, we recommend following these steps (all steps requires 'sudo' privileges): - put SELinux in permissive mode for 'tuned' (required if the version of the package 'selinux-policy' is < 3.11): $ semanage permissive -a tuned_t - disable the 'tuned' service from systemd and restart it by hand: $ systemctl stop tuned.service $ tuned -l -P -d Remember to restart kimchid service after these changes: $ systemctl restart kimchid.service If these steps do not solve the problem, try to update all 'tuned' related packages and the packages'selinux-policy' and 'selinux-policy-targeted'. ginger-1.3.0.1/VERSION000066400000000000000000000000101247135605500141740ustar00rootroot000000000000001.3.0.1 ginger-1.3.0.1/__init__.py000066400000000000000000000014701247135605500152500ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from ginger import Ginger __all__ = [Ginger] ginger-1.3.0.1/autogen.sh000077500000000000000000000007231247135605500151400ustar00rootroot00000000000000#!/bin/bash aclocal automake --add-missing autoreconf if [ ! -f "configure" ]; then echo "Failed to generate configure script. Check to make sure autoconf, " echo "automake, and other build dependencies are properly installed." exit 1 fi if [ "x$1" == "x--system" ]; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var else if [ $# -gt 0 ]; then ./configure $@ else ./configure --prefix=/usr/local fi fi ginger-1.3.0.1/build-aux/000077500000000000000000000000001247135605500150275ustar00rootroot00000000000000ginger-1.3.0.1/build-aux/config.rpath000077500000000000000000000444351247135605500173510ustar00rootroot00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2013 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < 1.2.0 (upstream clean) # - 1.2.0-1 => 1.2.0 (downstream clean) # - 1.2.0-2-g34e62f => 1.2.0 (upstream dirty) # - 1.2.0-1-2-g34e62f => 1.2.0 (downstream dirty) AWK_VERSION=' BEGIN { FS="-" } /^[0-9]/ { print $1 }' # tags and output releases: # - 1.2.0 => 0 (upstream clean) # - 1.2.0-1 => 1 (downstream clean) # - 1.2.0-2-g34e62f1 => 2.git34e62f1 (upstream dirty) # - 1.2.0-1-2-g34e62f1 => 1.2.git34e62f1 (downstream dirty) AWK_RELEASE=' BEGIN { FS="-"; OFS="." } /^[0-9]/ { if (NF == 1) print 0 else if (NF == 2) print $2 else if (NF == 3) print $2, "git" substr($3, 2) else if (NF == 4) print $2, $3, "git" substr($4, 2) }' if [ ! -d .git ]; then PKG_VERSION=`cat VERSION` else PKG_VERSION=`git describe --tags --match "[0-9]*" || cat VERSION` fi if test "x$1" = "x--full"; then echo $PKG_VERSION | tr -d '[:space:]' elif test "x$1" = "x--version"; then echo $PKG_VERSION | awk "$AWK_VERSION" | tr -cd '[:alnum:].' elif test "x$1" = "x--release"; then echo $PKG_VERSION | awk "$AWK_RELEASE" | tr -cd '[:alnum:].' else echo "usage: $0 [--full|--version|--release]" exit 1 fi ginger-1.3.0.1/configure.ac000066400000000000000000000042761247135605500154340ustar00rootroot00000000000000# Ginger # # Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA AC_PREREQ([2.63]) AC_INIT([ginger], [m4_esyscmd([./build-aux/pkg-version --version])]) AC_SUBST([PACKAGE_VERSION], [m4_esyscmd([./build-aux/pkg-version --version])]) AC_SUBST([PACKAGE_RELEASE], [m4_esyscmd([./build-aux/pkg-version --release])]) # Testing for version and release AS_IF([test "x$PACKAGE_VERSION" = x], AC_MSG_ERROR([package version not defined])) AS_IF([test "x$PACKAGE_RELEASE" = x], AC_MSG_ERROR([package release not defined])) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([-Wno-portability]) AM_PATH_PYTHON([2.6]) AC_PATH_PROG([PEP8], [pep8], [/usr/bin/pep8]) AC_SUBST([PYTHON_VERSION]) AC_PYTHON_MODULE([kimchi]) AC_SUBST([HAVE_PYMOD_KIMCHI]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.18]) AC_PATH_PROG([CHEETAH], [cheetah], [/usr/bin/cheetah]) # Checking for pyflakes AC_PATH_PROG([PYFLAKES], [pyflakes]) if test "x$PYFLAKES" = "x"; then AC_MSG_WARN([pyflakes not found]) fi AC_CONFIG_FILES([ Makefile controls/Makefile ginger.spec models/Makefile po/Makefile.in po/gen-pot ui/Makefile ui/config/Makefile ui/css/Makefile ui/css/base/Makefile ui/css/base/images/Makefile ui/js/Makefile ui/pages/Makefile ui/pages/help/Makefile ui/pages/help/en_US/Makefile ui/pages/help/pt_BR/Makefile ui/pages/help/zh_CN/Makefile contrib/Makefile contrib/DEBIAN/Makefile contrib/DEBIAN/control ],[ chmod +x po/gen-pot ]) AC_OUTPUT ginger-1.3.0.1/contrib/000077500000000000000000000000001247135605500145755ustar00rootroot00000000000000ginger-1.3.0.1/contrib/DEBIAN/000077500000000000000000000000001247135605500155175ustar00rootroot00000000000000ginger-1.3.0.1/contrib/DEBIAN/Makefile.am000066400000000000000000000014131247135605500175520ustar00rootroot00000000000000# Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA CLEANFILES = control ginger-1.3.0.1/contrib/DEBIAN/control.in000066400000000000000000000003751247135605500175340ustar00rootroot00000000000000Package: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ Section: base Priority: optional Architecture: all Depends: kimchi, python-libuser Maintainer: Daniel Henrique Barboza Description: Ginger plug-in for Kimchi web server ginger-1.3.0.1/contrib/Makefile.am000066400000000000000000000021631247135605500166330ustar00rootroot00000000000000# Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA SUBDIRS = DEBIAN EXTRA_DIST = \ make-deb.sh.in \ $(NULL) make-deb.sh: make-deb.sh.in $(top_builddir)/config.status $(AM_V_GEN)sed \ -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ -e 's|[@]PACKAGE_RELEASE[@]|$(PACKAGE_RELEASE)|g' \ < $< > $@-t && \ chmod a+x $@-t && \ mv $@-t $@ BUILT_SOURCES = make-deb.sh CLEANFILES = make-deb.sh ginger-1.3.0.1/contrib/make-deb.sh.in000066400000000000000000000004631247135605500172060ustar00rootroot00000000000000#!/bin/bash VERSION="@PACKAGE_VERSION@" RELEASE="@PACKAGE_RELEASE@" if [ ! -f configure ]; then echo "Please run this script from the top of the package tree" exit 1 fi TMPDIR=`mktemp -d` make DESTDIR=$TMPDIR install-deb dpkg-deb -b $TMPDIR ginger-${VERSION}-${RELEASE}.noarch.deb rm -rf $TMPDIR ginger-1.3.0.1/controls/000077500000000000000000000000001247135605500150005ustar00rootroot00000000000000ginger-1.3.0.1/controls/Makefile.am000066400000000000000000000021121247135605500170300ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA controls_PYTHON = \ __init__.py \ backup.py \ capabilities.py \ firmware.py \ ibm_sep.py \ interfaces.py \ network.py \ powermanagement.py \ sanadapters.py \ sensors.py \ users.py \ $(NULL) controlsdir = $(pythondir)/kimchi/plugins/ginger/controls CLEANFILES = \ $(controls_PYTHON:%.py=%.pyc) \ $(NULL) ginger-1.3.0.1/controls/__init__.py000066400000000000000000000022571247135605500171170ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from backup import Backup from capabilities import Capabilities from firmware import Firmware from ibm_sep import Sep from network import Network from powermanagement import PowerProfiles from sanadapters import SanAdapters from sensors import Sensors from users import Users __all__ = [ Backup, Capabilities, Firmware, Network, PowerProfiles, SanAdapters, Sensors, Sep, Users ] ginger-1.3.0.1/controls/backup.py000066400000000000000000000035411247135605500166220ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import cherrypy from cherrypy.lib.static import serve_file from kimchi.control.base import Collection, Resource class Backup(Resource): def __init__(self, model): super(Backup, self).__init__(model) self.role_key = "administration" self.admin_methods = ['GET', 'POST', 'DELETE'] self.archives = Archives(model) self.discard_archives = self.generate_action_handler( 'discard_archives', ['days_ago', 'counts_ago']) self.uri_fmt = '/backup/%s' # In future we will add self.schedules class Archives(Collection): def __init__(self, model): super(Archives, self).__init__(model) self.resource = Archive class Archive(Resource): def __init__(self, model, ident): super(Archive, self).__init__(model, ident) @property def data(self): info = {'identity': self.ident} info.update(self.info) return info @cherrypy.expose def file(self): self.lookup() return serve_file(self.info['file'], disposition='attachment', debug=True) ginger-1.3.0.1/controls/capabilities.py000066400000000000000000000017411247135605500200060ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Resource class Capabilities(Resource): def __init__(self, model): super(Capabilities, self).__init__(model) @property def data(self): return self.info ginger-1.3.0.1/controls/firmware.py000066400000000000000000000024271247135605500171730ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Resource class Firmware(Resource): def __init__(self, model, id=None): super(Firmware, self).__init__(model, id) self.role_key = "administration" self.admin_methods = ['PUT', 'POST'] self.uri_fmt = "/firmware/%s" self.update_params = ['path', 'overwrite-perm-ok'] self.commit = self.generate_action_handler('commit') self.reject = self.generate_action_handler('reject') @property def data(self): return self.info ginger-1.3.0.1/controls/ibm_sep.py000066400000000000000000000024211247135605500167670ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Resource class Sep(Resource): def __init__(self, model, id=None): super(Sep, self).__init__(model, id) self.update_params = ['hostname', 'port', 'community'] self.role_key = "administration" self.admin_methods = ['GET', 'POST', 'PUT'] self.uri_fmt = '/ibm_sep/%s' self.start = self.generate_action_handler('start') self.stop = self.generate_action_handler('stop') @property def data(self): return self.info ginger-1.3.0.1/controls/interfaces.py000066400000000000000000000030711247135605500174760ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Collection, Resource class Interfaces(Collection): def __init__(self, model): super(Interfaces, self).__init__(model) self.resource = Interface class Interface(Resource): def __init__(self, model, ident): super(Interface, self).__init__(model, ident) self.uri_fmt = '/network/interfaces/%s' self.update_params = ['ipaddr', 'netmask', 'gateway'] self.confirm_change = self.generate_action_handler('confirm_change') @property def data(self): return {'name': self.ident, 'type': self.info['type'], 'ipaddr': self.info['ipaddr'], 'netmask': self.info['netmask'], 'status': self.info['status'], 'editable': self.info['editable']} ginger-1.3.0.1/controls/network.py000066400000000000000000000024441247135605500170470ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from interfaces import Interfaces from kimchi.control.base import Resource class Network(Resource): def __init__(self, model): super(Network, self).__init__(model, None) self.role_key = "administration" self.admin_methods = ['PUT'] self.interfaces = Interfaces(model) self.uri_fmt = '/network/%s' self.update_params = ['nameservers', 'gateway'] self.confirm_change = self.generate_action_handler('confirm_change') @property def data(self): return self.info ginger-1.3.0.1/controls/powermanagement.py000066400000000000000000000024461247135605500205510ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Resource, Collection class PowerProfiles(Collection): def __init__(self, model): super(PowerProfiles, self).__init__(model) self.role_key = "administration" self.admin_methods = ['PUT'] self.resource = PowerProfile class PowerProfile(Resource): def __init__(self, model, ident): super(PowerProfile, self).__init__(model, ident) self.ident = ident self.update_params = ["active"] @property def data(self): return self.info ginger-1.3.0.1/controls/sanadapters.py000066400000000000000000000024621247135605500176630ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Collection, Resource class SanAdapters(Collection): def __init__(self, model): super(SanAdapters, self).__init__(model) self.role_key = "administration" self.admin_methods = ['GET'] self.resource = SanAdapter class SanAdapter(Resource): def __init__(self, model, ident): super(SanAdapter, self).__init__(model, ident) self.uri_fmt = '/san_adapters/%s' @property def data(self): self.info.update({'name': self.ident}) return self.info ginger-1.3.0.1/controls/sensors.py000066400000000000000000000020621247135605500170460ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Resource class Sensors(Resource): def __init__(self, model, id=None): super(Sensors, self).__init__(model, id) self.role_key = "administration" self.admin_methods = ['GET'] @property def data(self): return self.info ginger-1.3.0.1/controls/users.py000066400000000000000000000021671247135605500165210ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.control.base import Collection, Resource class Users(Collection): def __init__(self, model): super(Users, self).__init__(model) self.role_key = "administration" self.admin_methods = ['GET', 'POST', 'DELETE'] self.resource = User class User(Resource): @property def data(self): return self.info ginger-1.3.0.1/docs/000077500000000000000000000000001247135605500140655ustar00rootroot00000000000000ginger-1.3.0.1/docs/API.md000066400000000000000000000146101247135605500150220ustar00rootroot00000000000000## Project Ginger REST API Specification The Ginger API provides all functionalities of the plugin that may be used directly by external tools. In the following sections you will find the specification of all Collections and Resource types that are supported and URIs where they can be accessed. As Ginger API uses Kimchi framework, it uses the same general conventions of Kimchi. In order to use the API effectively, please consider the following general conventions (from Kimchi documentation): * The **Content Type** of the API is JSON. When making HTTP requests to this API you should specify the following headers: * Accept: application/json * Content-type: application/json * A **Collection** is a group of Resources of a given type. * A **GET** request retrieves a list of summarized Resource representations This summary *may* include all or some of the Resource properties but *must* include a link to the full Resource representation. * A **POST** request will create a new Resource in the Collection. The set of Resource properties *must* be specified as a JSON object in the request body. * No other HTTP methods are supported for Collections * A **Resource** is a representation of a singular object in the API * A **GET** request retrieves the full Resource representation. * A **DELETE** request will delete the Resource. This request *may* contain a JSON object which specifies optional parameters. * A **PUT** request is used to modify the properties of a Resource * A **POST** request commits an *action* upon a Resource. The request body *must* contain a JSON object which specifies parameters. * URIs begin with a '/plugins/ginger' to indicate the root of the Ginger API. * Variable segments in the URI begin with a ':' and should replaced with the appropriate resource identifier. ### Resource: Firmware (Power System firmware) **URI:** /plugins/ginger/firmware **Methods:** * **GET**: Retrieve the current firmware levels. * level: The firmware levels (MI and ML, or Maint. Level) The final group is the currently booted firmware. * **PUT**: Update the firmware level of the booted side. * path: The remote file path pointing to the firmware image file. * overwrite-perm-ok: Indicate whether possibly overwriting the permanent boot side while updating the fw is acceptable. * Required: No * Default: True * A value of 'False' guarantees the current perm side image remains untouched. Note: If running permanent image, this will result in an error. **URI:** /plugins/ginger/firmware/commit ** Methods** * **POST**: Commit the image running on the temp side to the perm side. In order to do this, the machine must be running the temp image. **URI:** /plugins/ginger/firmware/reject ** Methods** * **POST**: Reject the image on the temp side, overwriting it with the image from the perm side. In order to do this, the machine must be running the permanent image. ### Collection: SAN Adapters (Fibre Channel SCSI Hosts - HBAs) **URI:** /plugins/ginger/san_adapters **Methods:** * **GET**: Retrieve a summarized list with the names of all defined fibre channel scsi hosts found in the server system. ### Resource: SAN Adapter (Fibre Channel SCSI Host - HBA) **URI:** /plugins/ginger/san_adapters/*:name* **Methods:** * **GET**: Retrieve many information from a given SAN Adapter * name: The name of the adapter in the system (usually "hostXX"). * wwpn: World Wide Port Name of the adapter. * wwnn: World Wide Node Name of the adapter. * state: Indicates the current state of the adapter port (eg. Online or Offline). * max_vports: Maximum number of virtual ports supported in a NVIP (N-port ID virtualization) configuration by the adapter. * vports_inuse: Number of virtual ports being used in a NVIP configuration. * speed: Transfer speed being used by the adapter (eg. 1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit, or more). * symbolic_name: HBA overview information. ### Resource: Sensors **URI:** /plugins/ginger/sensors **Methods:** * **GET**: Get sensors data for devices on the system, including CPU temperatures, fan speeds, and hard disk temperatures. This command uses lm-sensors, so it will return all sensor data located in sysfs files, or in the sensors.conf file, if it has been created by the system admin. Note: The default unit for temperature is Celsius. This can be changed to Fahrenheit in ginger.conf. Due to the large number of sensors in existence, and the user's ability to customize sensor names, the output will vary greatly from system to system. The only consistency will be the json items named 'sensors' and 'hdds' * sensors: Each sensor or sensor group returned by 'sensors', depending on whether there are multiple sensors on a chip. For example, a CPU may return a package temperature reading (along with a min, max, critical, and alarm temps) and additional readings for each core. If fan speeds are reported by lm-sensors, these will be returned as well. The last element of each device will be its unit, instead of appending a unit to each value. Note: Power supplies may report a negative value, which is valid. * hdds: The temperatures for disk drives in the system, returned by hddtemp. These will be in the format { "/dev/sda":102.0 } for each drive. The last item in the list will be a the temperature unit. ### Resource: IBM Serviceable Event Provider (SEP) **URI:** /plugins/ginger/ibm_sep **Methods:** * **GET**: Retrieve a dictionary with the SEP status and subscription information: * status: Status of the SEP agent. Can be 'running' or 'not running'. * subscription: Dictionaries with the SEP subscription information: * hostname: Hostname of the host server. * port: Number of the network port used by the SEP agent. * community: SNMP community name which host server is member. * **PUT**: Create and/or update a subscription *Actions (POST):** * start: Start the SEP daemon on host server. * stop: Stop the SEP daemon on host server. ginger-1.3.0.1/ginger.conf000066400000000000000000000016211247135605500152570ustar00rootroot00000000000000[kimchi] enable = True plugin_class = "Ginger" uri = "/plugins/ginger" [backup] default_include = ['/etc', '/var/spool/cron'] default_exclude = ['/etc/init.d', '/etc/rc.d', '/etc/rc?.d', ] timeout = '300' [unit] temperature = 'C' [/] tools.nocache.on = True tools.trailing_slash.on = False tools.sessions.on = True tools.sessions.name = 'kimchi' tools.sessions.httponly = True tools.sessions.locking = 'explicit' tools.sessions.storage_type = 'ram' [/firmware] tools.kimchiauth.on = True [/powerprofiles] tools.kimchiauth.on = True [/users] tools.kimchiauth.on = True [/network] tools.kimchiauth.on = True [/backup] tools.kimchiauth.on = True [/san_adapters] tools.kimchiauth.on = True [/sensors] tools.kimchiauth.on = True [/ibm_sep] tools.kimchiauth.on = True [/help] tools.staticdir.on = True tools.nocache.on = True tools.staticdir.dir = kimchi.config.PluginPaths('ginger').ui_dir + '/pages/help' ginger-1.3.0.1/ginger.py000066400000000000000000000034741247135605500147720ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import json import os from controls import Backup, Capabilities, Firmware, Network, PowerProfiles from controls import SanAdapters, Sensors, Sep, Users from i18n import messages from kimchi.config import PluginPaths from kimchi.root import Root from models import GingerModel class Ginger(Root): def __init__(self): self.model = GingerModel() super(Ginger, self).__init__(self.model) self.backup = Backup(self.model) self.capabilities = Capabilities(self.model) self.firmware = Firmware(self.model) self.powerprofiles = PowerProfiles(self.model) self.sensors = Sensors(self.model) self.users = Users(self.model) self.network = Network(self.model) self.api_schema = json.load(open(os.path.join(os.path.dirname( os.path.abspath(__file__)), 'API.json'))) self.paths = PluginPaths('ginger') self.domain = "ginger" self.messages = messages self.san_adapters = SanAdapters(self.model) self.ibm_sep = Sep(self.model) ginger-1.3.0.1/ginger.spec.in000066400000000000000000000054431247135605500156770ustar00rootroot00000000000000Name: ginger Version: @PACKAGE_VERSION@ Release: @PACKAGE_RELEASE@%{?dist} Summary: Host management plugin for the Kimchi server BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release} Group: System Environment/Base License: LGPL/ASL2 Source0: %{name}-%{version}.tar.gz BuildRequires: gettext-devel >= 0.17 BuildRequires: python-cheetah Requires: gettext >= 0.17 Requires: kimchi >= %{version} Requires: tuned Requires: libuser-python Requires: lm_sensors Requires: hddtemp %ifarch ppc64 ppc Requires: powerpc-utils Requires: serviceable.event.provider %endif %description Ginger is a host management plugin to Kimchi, that provides an intuitive web panel with common tools for configuring and operating Linux systems. Kimchi is a web server application application to manage KVM/Qemu virtual machines. %prep %setup %build %configure make %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install %clean rm -rf $RPM_BUILD_ROOT %post %if 0%{?with_systemd} install -dm 0755 /usr/lib/systemd/system/kimchid.service.requires ln -sf ../tuned.service /usr/lib/systemd/system/kimchid.service.requires /bin/systemctl daemon-reload >/dev/null 2>&1 || : service kimchid restart %endif %postun %if 0%{?with_systemd} rm -f /usr/lib/systemd/system/kimchid.service.requires/tuned.service /bin/systemctl daemon-reload >/dev/null 2>&1 || : service kimchid restart %endif %files %attr(-,root,root) %{python_sitelib}/kimchi/plugins/ginger/*.py* %{python_sitelib}/kimchi/plugins/ginger/API.json %{python_sitelib}/kimchi/plugins/ginger/controls/*.py* %{python_sitelib}/kimchi/plugins/ginger/models/*.py* %{_datadir}/kimchi/plugins/ginger/mo/*/LC_MESSAGES/ginger.mo %{_datadir}/kimchi/plugins/ginger/ui/config/tab-ext.xml %{_datadir}/kimchi/plugins/ginger/ui/css/base/images/*.gif %{_datadir}/kimchi/plugins/ginger/ui/css/base/images/*.png %{_datadir}/kimchi/plugins/ginger/ui/css/ginger.css %{_datadir}/kimchi/plugins/ginger/ui/css/host-admin.css %{_datadir}/kimchi/plugins/ginger/ui/js/host-admin.js %{_datadir}/kimchi/plugins/ginger/ui/js/util.js %{_datadir}/kimchi/plugins/ginger/ui/pages/help/en_US/host-admin.html %{_datadir}/kimchi/plugins/ginger/ui/pages/help/pt_BR/host-admin.html %{_datadir}/kimchi/plugins/ginger/ui/pages/help/zh_CN/host-admin.html %{_datadir}/kimchi/plugins/ginger/ui/pages/host-admin.html.tmpl %{_datadir}/kimchi/plugins/ginger/ui/pages/i18n.json.tmpl %{_sysconfdir}/kimchi/plugins.d/ginger.conf %changelog * Thu Oct 2 2014 Rodrigo Trujillo - Add Help pages for Ginger - Change build system to enable and release Help pages * Wed Jul 2 2014 Paulo Vital 1.2.1 - Changed the package name from kimchi-ginger to ginger. * Wed Apr 16 2014 Zhou Zheng Sheng 1.2.0 - Initial release of Kimchi-ginger dedicated RPM package. ginger-1.3.0.1/i18n.py000066400000000000000000000124541247135605500142740ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import gettext _ = gettext.gettext messages = { "GINNET0001E": _("Failed to read /etc/resolv.conf because %(reason)s"), "GINNET0002E": _("Failed to write /etc/resolv.conf because %(reason)s"), "GINNET0003E": _("Invalid network parameters. Details: %(err)s"), "GINNET0004E": _("Unable to update interface configuration. " "Details: %(err)s"), "GINNET0005E": _("Invalid parameter for DNS servers"), "GINNET0006E": _("Invalid parameter for interface ip address"), "GINNET0007E": _("Invalid parameter for interface netmask"), "GINNET0008E": _("Invalid parameter for network gateway"), "GINNET0009E": _("Unable to get default gateway: %(err)s"), "GINNET0010E": _("Unable to delete default gateway: %(err)s"), "GINNET0011E": _("Unable to set default gateway: %(err)s"), "GINNET0012E": _("Invalid ip/netmask inputs. Both fields must be valids " "ip/netmask values or both must be blank (will erase " "the current IP/netmask)."), "GINNET0013E": _("Interface %(name)s is not editable because it belongs " "to a vlan or bridge"), "GINUSER0001E": _("Specify name, password, group and profile for the new " "user."), "GINUSER0002E": _("User name is a required string."), "GINUSER0003E": _("User password is a required string."), "GINUSER0004E": _("User group is a required string."), "GINUSER0005E": _("User profile is required and should be one among " "kimchiuser, virtuser or admin."), "GINUSER0006E": _("Could not add user '%(user)s' to kvm group."), "GINUSER0007E": _("Could not add user '%(user)s' to sudoers list."), "GINUSER0008E": _("The user name '%(user)s' is already in use'."), "GINUSER0009E": _("Could not create user '%(user)s'."), "GINUSER0010E": _("Could not delete user '%(user)s'."), "GINUSER0011E": _("User '%(user)s' does not exist."), "GINUSER0012E": _("Could not delete group '%(group)s'"), "GINUSER0013E": _("Group for user '%(user)s' does not exist for removal."), "GINFW0001E": _("Cannot update system firmware while running VMs."), "GINFW0002E": _("Firmware image unpack failed: rc = %(rc)s. " "Details: %(err)s"), "GINFW0003E": _("FW update failed: " "No image file found in the package file."), "GINFW0004E": _("Error flashing firmware. rc = %(rc)s. \ Please see /usr/sbin/update_flash for rc reasons."), "GINFW0005E": _("Error commiting firmware. rc = %(rc)s. \ Ensure you are booted to the temporary side."), "GINFW0006E": _("Error rejecting firmware. rc = %(rc)s. \ Ensure you are booted to the permanent side."), "GINHBK0001E": _('Failed to create tar archive "%(name)s", cmd: ' '"%(cmd)s". Inspect error log for more information.'), "GINHBK0002E": _('Failed to delete archive file "%(name)s".'), "GINHBK0003E": _('Failed to create archive dir "%(dir)s". ' 'Inspect error log for more information.'), "GINHBK0004E": _('Description too long.'), "GINHBK0005E": _('Please check the uniqueness of the paths or patterns.'), "GINHBK0006E": _('Path or pattern is too long or too short.'), "GINHBK0007E": _('Invalid days_ago number.'), "GINHBK0008E": _('Invalid counts_ago number.'), "GINHBK0009E": _('Failed to create archive "%(identity)s". ' 'Inspect error log for more information.'), "GINHBK0010E": _('Timeout while creating archive "%(identity)s", the ' 'files might be too large for a configuration backup.'), "GINADAP0001E": _("SAN adapter '%(adapter)s' does not exist in the system." ), "GINSEP0001E": _("System hostname is a required parameter."), "GINSEP0002E": _("System port number is a required parameter."), "GINSEP0003E": _("SNMP community is a required parameter."), "GINSEP0004E": _("SEP command execution error: '%(cmd)s' - rc: '%(rc)s' \ - error: '%(error)s'."), "GINPOWER001E": _("Failed to retrieve power management profiles: \ Host OS does not support the tuned-adm package."), "GINPOWER002E": _("Failed to retrieve power management profiles: \ Daemon 'tuned-adm' is not active."), "GINPOWER003E": _("Failed to retrieve power management profiles: \ Package 'tuned-adm' is not installed."), "GINPOWER004E": _("Error activating power saving profile %(profile)s.") } ginger-1.3.0.1/m4/000077500000000000000000000000001247135605500134555ustar00rootroot00000000000000ginger-1.3.0.1/m4/ac_python_module.m4000066400000000000000000000012071247135605500172500ustar00rootroot00000000000000dnl @synopsis AC_PYTHON_MODULE(modname[, fatal]) dnl dnl Checks for Python module. dnl dnl If fatal is non-empty then absence of a module will trigger an dnl error. dnl dnl @category InstalledPackages dnl @author Andrew Collier . dnl @version 2004-07-14 dnl @license AllPermissive AC_DEFUN([AC_PYTHON_MODULE],[ AC_MSG_CHECKING(python module: $1) python -c "import $1" 2>/dev/null if test $? -eq 0; then AC_MSG_RESULT(yes) eval AS_TR_CPP(HAVE_PYMOD_$1)=yes else AC_MSG_RESULT(no) eval AS_TR_CPP(HAVE_PYMOD_$1)=no # if test -n "$2" then AC_MSG_ERROR(failed to find required module $1) exit 1 fi fi ]) ginger-1.3.0.1/m4/gettext.m4000066400000000000000000000356151247135605500154150ustar00rootroot00000000000000# gettext.m4 serial 66 (gettext-0.18.2) dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); ]], [[ bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ]])], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) AC_SUBST([POSUB]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) ginger-1.3.0.1/m4/iconv.m4000066400000000000000000000216201247135605500150360ustar00rootroot00000000000000# iconv.m4 serial 18 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; const char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; }]])], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [ changequote(,)dnl case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac changequote([,])dnl ]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) fi ]) ginger-1.3.0.1/m4/intlmacosx.m4000066400000000000000000000047531247135605500161110ustar00rootroot00000000000000# intlmacosx.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2004-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in Mac OS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFPreferencesCopyAppValue(NULL, NULL)]])], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in Mac OS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[CFLocaleCopyCurrent();]])], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) ginger-1.3.0.1/m4/lib-ld.m4000066400000000000000000000071431247135605500150670ustar00rootroot00000000000000# lib-ld.m4 serial 6 dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) ginger-1.3.0.1/m4/lib-prefix.m4000066400000000000000000000204221247135605500157600ustar00rootroot00000000000000# lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) ginger-1.3.0.1/m4/nls.m4000066400000000000000000000023151247135605500145140ustar00rootroot00000000000000# nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) ginger-1.3.0.1/m4/po.m4000066400000000000000000000450411247135605500143410ustar00rootroot00000000000000# po.m4 serial 21 (gettext-0.18.3) dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.60]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AC_PROG_SED])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. AC_PREREQ([2.50]) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$][$1]) else AC_MSG_RESULT([no]) fi AC_SUBST([$1])dnl ]) ginger-1.3.0.1/models/000077500000000000000000000000001247135605500144205ustar00rootroot00000000000000ginger-1.3.0.1/models/Makefile.am000066400000000000000000000021161247135605500164540ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA models_PYTHON = \ __init__.py \ backup.py \ capabilities.py \ firmware.py \ ibm_sep.py \ interfaces.py \ model.py \ network.py \ powermanagement.py \ sanadapters.py \ sensors.py \ users.py \ $(NULL) modelsdir = $(pythondir)/kimchi/plugins/ginger/models CLEANFILES = \ $(models_PYTHON:%.py=%.pyc) \ $(NULL) ginger-1.3.0.1/models/__init__.py000066400000000000000000000015031247135605500165300ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from model import GingerModel __all__ = [GingerModel] ginger-1.3.0.1/models/backup.py000066400000000000000000000205521247135605500162430ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import errno import hashlib import itertools import os import time import uuid import cherrypy from kimchi.config import PluginPaths from kimchi.exception import NotFoundError, OperationFailed, TimeoutExpired from kimchi.utils import kimchi_log, run_command class BackupModel(object): def __init__(self, **kargs): self._objstore = kargs['objstore'] self._archives_model = kargs['archives_model'] self._archive_model = kargs['archive_model'] def _get_archives_to_discard(self, archives, days_ago, counts_ago): if days_ago == 0 or counts_ago == 0: return archives[:] to_remove = [] # Older archive comes first. archives.sort(lambda l, r: cmp(l['timestamp'], r['timestamp'])) if counts_ago != -1: to_remove.extend(archives[:-counts_ago]) archives = archives[-counts_ago:] if days_ago != -1: expire = time.time() - 3600 * 24 * days_ago to_remove.extend( itertools.takewhile( lambda ar: ar['timestamp'] < expire, archives)) return to_remove def discard_archives(self, _ident, days_ago=-1, counts_ago=-1): ''' Discard archives older than some days ago, or some counts ago. ''' with self._objstore as session: archives = [ session.get(ArchivesModel._objstore_type, ar_id) for ar_id in self._archives_model._session_get_list(session)] to_remove = self._get_archives_to_discard( archives, days_ago, counts_ago) for ar in to_remove: self._archive_model._session_delete_archive(session, ar['identity']) def _tar_create_archive(directory_path, archive_id, include, exclude): archive_file = os.path.join(directory_path, archive_id + '.tar.gz') exclude = ['--exclude=' + toExclude for toExclude in exclude] cmd = ['tar', '--create', '--gzip', '--absolute-names', '--file', archive_file, '--selinux', '--acl', '--xattrs'] + exclude + include timeout = int(cherrypy.request.app.config['backup']['timeout']) out, err, rc = run_command(cmd, timeout) if rc != 0: raise OperationFailed( 'GINHBK0001E', {'name': archive_file, 'cmd': ' '.join(cmd)}) return archive_file def _sha256sum(filename): sha = hashlib.sha256() with open(filename, 'rb') as f: for c in iter(lambda: f.read(131072), ''): sha.update(c) return sha.hexdigest() class ArchivesModel(object): _objstore_type = 'ginger_backup_archive' _archive_dir = os.path.join(PluginPaths('ginger').state_dir, 'ginger_backups') def __init__(self, **kargs): self._objstore = kargs['objstore'] self._create_archive_dir() @classmethod def _create_archive_dir(cls): try: os.makedirs(cls._archive_dir) except OSError as e: # It's OK if archive_dir already exists if e.errno != errno.EEXIST: kimchi_log.error('Error creating archive dir %s: %s', cls._archive_dir, e) raise OperationFailed('GINHBK0003E', {'dir': cls._archive_dir}) @property def _default_include(self): # This function builds a new copy of the list for each invocation, # so that the caller can modify the returned list as wish without # worrying about changing the original reference. return list(cherrypy.request.app.config['backup']['default_include']) @property def _default_exclude(self): # See _default_include() comments for explanation. return list(cherrypy.request.app.config['backup']['default_exclude']) def _create_archive(self, params): error = None try: params['file'] = _tar_create_archive( self._archive_dir, params['identity'], params['include'], params['exclude']) params['checksum'] = {'algorithm': 'sha256', 'value': _sha256sum(params['file'])} with self._objstore as session: session.store(self._objstore_type, params['identity'], params) except TimeoutExpired as e: error = e reason = 'GINHBK0010E' except Exception as e: error = e reason = 'GINHBK0009E' if error is not None: msg = 'Error creating archive %s: %s' % (params['identity'], error) kimchi_log.error(msg) try: with self._objstore as session: session.delete(self._objstore_type, params['identity'], ignore_missing=True) except Exception as e_session: kimchi_log.error('Error cleaning archive meta data %s. ' 'Error: %s', params['identity'], e_session) if params['file'] != '': try: os.unlink(params['file']) except Exception as e_file: kimchi_log.error('Error cleaning archive file %s. ' 'Error: %s', params['file'], e_file) raise OperationFailed(reason, {'identity': params['identity']}) def create(self, params): archive_id = str(uuid.uuid4()) stamp = int(time.mktime(time.localtime())) # Though formally we ask front-end to not send "include" at all when # it's empty, but in implementation we try to be tolerant. # Front-end can also send [] to indicate the "include" is empty. include = params.get('include') exclude = params.get('exclude', []) if not include: include = self._default_include if not exclude: exclude = self._default_exclude ar_params = {'identity': archive_id, 'include': include, 'exclude': exclude, 'description': params.get('description', ''), 'checksum': {}, 'timestamp': stamp, 'file': ''} self._create_archive(ar_params) return archive_id def _session_get_list(self, session): # Assume session is already locked. return session.get_list(self._objstore_type, sort_key='timestamp') def get_list(self): with self._objstore as session: return self._session_get_list(session) class ArchiveModel(object): def __init__(self, **kargs): self._objstore = kargs['objstore'] def lookup(self, archive_id): with self._objstore as session: info = session.get(ArchivesModel._objstore_type, archive_id) return info def _session_delete_archive(self, session, archive_id): # Assume session is already locked. try: ar_params = session.get(ArchivesModel._objstore_type, archive_id) except NotFoundError: return if ar_params['file'] != '': try: os.unlink(ar_params['file']) except OSError as e: # It's OK if the user already removed the file manually if e.errno not in (errno.EACCES, errno.ENOENT): raise OperationFailed( 'GINHBK0002E', {'name': ar_params['file']}) session.delete(ArchivesModel._objstore_type, archive_id) def delete(self, archive_id): with self._objstore as session: self._session_delete_archive(session, archive_id) ginger-1.3.0.1/models/capabilities.py000066400000000000000000000024731247135605500174310ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA class CapabilitiesModel(object): def __init__(self, features): self.features_enabled = {} self._set_capabilities(features) def lookup(self, *ident): return self.features_enabled def _set_capabilities(self, features): for feat in features: feat_name = type(feat).__name__.replace('Model', '') try: self.features_enabled[feat_name] = \ feat.is_feature_available() except AttributeError: self.features_enabled[feat_name] = True ginger-1.3.0.1/models/firmware.py000066400000000000000000000073531247135605500166160ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import os import platform from kimchi.exception import OperationFailed from kimchi.utils import kimchi_log from kimchi.utils import run_command # FIXME: When model is restructured, use # vms_get_list_by_state('running') instead def detect_live_vm(): with open('/proc/modules') as f: for line in f: column = line.split() if column[0].startswith('kvm_') and column[2] != '0': return True return False class FirmwareModel(object): """ The model class for viewing and updating the Power firmware level """ def lookup(self, params=None): output, error, rc = run_command('lsmcode') if rc: kimchi_log.error('Unable to retreive firmware level.') return {'level': 'Unknown'} # Cut out the chatter from the command output levels = output.split()[5:] levels = " ".join(levels) return {'level': levels} def update(self, name, params): if detect_live_vm(): kimchi_log.error('Cannot update system fw while running VMs.') raise OperationFailed('GINFW0001E') fw_path = params['path'] pow_ok = params.get('overwrite-perm-ok', True) # First unpack the rpm to get the fw img file # FIXME: When there's a .deb package available, add support for that command = ['rpm', '-U', '--force', '--ignoreos', fw_path] output, error, rc = run_command(command) if rc: # rpm returns num failed pkgs on failure or neg for unknown raise OperationFailed('GINFW0002E', {'rc': rc, 'err': error}) # The image file should now be in /tmp/fwupdate/ # and match the rpm name. image_file, ext = os.path.splitext(os.path.basename(fw_path)) if image_file is None: kimchi_log.error('FW update failed: ' 'No image file found in the package file.') raise OperationFailed('GINFW0003E') command = ['update_flash', '-f', os.path.join('/tmp/fwupdate', '%s.img' % image_file)] if not pow_ok: command.insert(1, '-n') kimchi_log.info('FW update: System will reboot to flash the firmware.') output, error, rc = run_command(command) if rc: raise OperationFailed('GINFW0004E', {'rc': rc}) def commit(self, name): command = ['update_flash', '-c'] output, error, rc = run_command(command) if rc: raise OperationFailed('GINFW0005E', {'rc': rc}) # update_flash returns a message on success, so log it. kimchi_log.info(output) def reject(self, name): command = ['update_flash', '-r'] output, error, rc = run_command(command) if rc: raise OperationFailed('GINFW0006E', {'rc': rc}) # update_flash returns a message on success, so log it. kimchi_log.info(output) def is_feature_available(self): return platform.machine() in ['ppc', 'ppc64'] ginger-1.3.0.1/models/ibm_sep.py000066400000000000000000000132071247135605500164130ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.exception import OperationFailed from kimchi.utils import kimchi_log, run_command class SepModel(object): """ The IBM Serviceable Event Provider (SEP) class for model """ def __init__(self, **kargs): self._activation_info = {} self._sep_status = None def _get_subscriber(self): cmd = ['/opt/ibm/seprovider/bin/getSubscriber'] output, error, rc = run_command(cmd) if rc > 1: kimchi_log.error('SEP execution error: %s - %s - %s' % (cmd, rc, error)) raise OperationFailed('GINSEP0004E', {'cmd': cmd, 'rc': rc, 'error': error}) if (len(output) < 1) or (rc == 1): self._activation_info['hostname'] = '' self._activation_info['port'] = '' self._activation_info['community'] = '' else: # parse the output and return the content (hostname, port, community) = output.split()[1].split(',') self._activation_info['hostname'] = hostname.split('=')[1] self._activation_info['port'] = port.split('=')[1] self._activation_info['community'] = community.split('=')[1] return self._activation_info def start(self, params=None): cmd = ['/opt/ibm/seprovider/bin/sepcli', 'start'] output, error, rc = run_command(cmd) if rc != 0: kimchi_log.error('SEP execution error: %s - %s - %s' % (cmd, rc, error)) raise OperationFailed('GINSEP0004E', {'cmd': cmd, 'rc': rc, 'error': error}) self._sep_status = 'running' def stop(self, params=None): cmd = ['/opt/ibm/seprovider/bin/sepcli', 'stop'] output, error, rc = run_command(cmd) if rc != 10: kimchi_log.error('SEP execution error: %s - %s - %s' % (cmd, rc, error)) raise OperationFailed('GINSEP0004E', {'cmd': cmd, 'rc': rc, 'error': error}) self._sep_status = 'not running' def _status(self): cmd = ['/opt/ibm/seprovider/bin/sepcli', 'status'] output, error, rc = run_command(cmd) # workarround to get the correct output from this command if len(output) == 0: output = error if rc == 10: # sep is ** officially** not running self._sep_status = 'not running' kimchi_log.error(output) elif rc != 0: # command not success self._sep_status = 'not running' kimchi_log.error('SEP execution error: %s - %s - %s' % (cmd, rc, error)) raise OperationFailed('GINSEP0004E', {'cmd': cmd, 'rc': rc, 'error': error}) else: # sep is running self._sep_status = 'running' kimchi_log.error(output) def lookup(self, params=None): """ Returns a dictionary with all SEP information. """ info = {} self._status() info['status'] = self._sep_status info['subscription'] = self._get_subscriber() return info def update(self, name, params): """ Update/add a subscription machine at IBM SEP tool. """ # check if the hostname to update is the same of the current # subscription and unsubscribe it if not - we are working with # only one subscription at the moment. if ((self._activation_info['hostname'] != '') and (params['hostname'] != self._activation_info['hostname'])): cmd = ['/opt/ibm/seprovider/bin/unsubscribe', '-h', self._activation_info['hostname']] output, error, rc = run_command(cmd) if rc != 0: kimchi_log.error('SEP execution error: %s - %s - %s' % (cmd, rc, error)) raise OperationFailed('GINSEP0004E', {'cmd': cmd, 'rc': rc, 'error': error}) # update the current subscription info, or add a new one. cmd = ['/opt/ibm/seprovider/bin/subscribe', '-h', params['hostname'], '-p', params['port'], '-c', params['community']] output, error, rc = run_command(cmd) if rc != 0: kimchi_log.error('SEP execution error: %s - %s - %s' % (cmd, rc, error)) raise OperationFailed('GINSEP0004E', {'cmd': cmd, 'rc': rc, 'error': error}) self._sep_status = 'running' def is_feature_available(self): cmd = ['/opt/ibm/seprovider/bin/getSubscriber'] _, _, rc1 = run_command(cmd) cmd = ['/opt/ibm/seprovider/bin/sepcli', 'status'] _, _, rc2 = run_command(cmd) return rc1 > 1 and rc2 == 0 ginger-1.3.0.1/models/interfaces.py000066400000000000000000000140671247135605500171250ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import ipaddr import libvirt import lxml.etree as ET from lxml.builder import E from threading import Timer from kimchi import netinfo from kimchi.exception import InvalidParameter, NotFoundError, OperationFailed from kimchi.model.libvirtconnection import LibvirtConnection from kimchi.xmlutils.utils import xpath_get_text class InterfacesModel(object): def get_list(self): nics = [nic for nic in netinfo.all_interfaces()] return sorted(nics) class InterfaceModel(object): _confirm_timout = 10.0 # Second def __init__(self): self._rollback_timer = None def lookup(self, name): try: info = netinfo.get_interface_info(name) except ValueError: raise NotFoundError("KCHIFACE0001E", {'name': name}) info['editable'] = self._is_interface_editable(name) return info def _is_interface_editable(self, iface): return iface in self._get_all_libvirt_interfaces() def _get_all_libvirt_interfaces(self): conn = LibvirtConnection("qemu:///system").get() return [iface.name() for iface in conn.listAllInterfaces()] def _get_interface_info(self, name): try: info = netinfo.get_interface_info(name) except ValueError: raise NotFoundError("KCHIFACE0001E", {'name': name}) if not info['ipaddr']: info['ipaddr'], info['netmask'] = \ self._get_static_config_interface_address(name) return info def _get_static_config_interface_address(self, name): def _get_ipaddr_info(libvirt_interface_xml): search_ip = \ xpath_get_text(libvirt_interface_xml, "/interface/protocol[@family='ipv4']" "/ip/@address") if not len(search_ip): return '', '' search_prefix = \ xpath_get_text(libvirt_interface_xml, "/interface/protocol[@family='ipv4']" "/ip/@prefix") ip_obj = ipaddr.IPv4Network('%s/%s' % (search_ip[0], search_prefix[0])) return str(ip_obj.ip), str(ip_obj.netmask) conn = LibvirtConnection("qemu:///system").get() iface_obj = conn.interfaceLookupByName(name) iface_libvirt_xml = \ iface_obj.XMLDesc(libvirt.VIR_INTERFACE_XML_INACTIVE) return _get_ipaddr_info(iface_libvirt_xml) def update(self, name, params): if not self._is_interface_editable(name): raise InvalidParameter('GINNET0013E', {'name': name}) try: iface_xml = self._create_iface_xml(name, params) except (ipaddr.AddressValueError, ipaddr.NetmaskValueError) as e: raise InvalidParameter('GINNET0003E', {'err': e.message}) self._create_libvirt_network_iface(iface_xml) def _create_iface_xml(self, iface, net_params): m = E.interface( E.start(mode='onboot'), type='ethernet', name=iface) if net_params['ipaddr'] and net_params['netmask']: n = ipaddr.IPv4Network('%s/%s' % (net_params['ipaddr'], net_params['netmask'])) protocol_elem = E.protocol(E.ip(address=str(n.ip), prefix=str(n.prefixlen)), family='ipv4') if 'gateway' in net_params: protocol_elem.append((E.route(gateway=net_params['gateway']))) m.append(protocol_elem) elif net_params['ipaddr'] or net_params['netmask']: raise InvalidParameter('GINNET0012E') return ET.tostring(m) def _create_libvirt_network_iface(self, iface_xml): conn = LibvirtConnection("qemu:///system").get() # Only one active transaction is allowed in the system level. # It implies that we can use changeBegin() as a synchronized point. conn.changeBegin() try: iface = conn.interfaceDefineXML(iface_xml) self._rollback_timer = Timer( self._confirm_timout, self._rollback_on_failure, args=[iface]) if iface.isActive(): iface.destroy() iface.create() self._rollback_timer.start() except Exception as e: self._rollback_on_failure(iface) raise OperationFailed('GINNET0004E', {'err': e.message}) def _rollback_on_failure(self, iface): ''' Called by the Timer in a new thread to cancel wrong network configuration and rollback to previous configuration. ''' conn = LibvirtConnection("qemu:///system").get() try: conn.changeRollback() if iface.isActive(): iface.destroy() iface.create() except libvirt.libvirtError as e: # In case the timeout thread is preempted, and confirm_change() is # called before our changeRollback(), we can just ignore the # VIR_ERR_OPERATION_INVALID error. if e.get_error_code() != libvirt.VIR_ERR_OPERATION_INVALID: raise def confirm_change(self, _name): conn = LibvirtConnection("qemu:///system").get() self._rollback_timer.cancel() conn.changeCommit() ginger-1.3.0.1/models/model.py000066400000000000000000000052641247135605500161010ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from backup import ArchiveModel, ArchivesModel, BackupModel from capabilities import CapabilitiesModel from firmware import FirmwareModel from ibm_sep import SepModel from interfaces import InterfacesModel, InterfaceModel from network import NetworkModel from powermanagement import PowerProfilesModel, PowerProfileModel from sanadapters import SanAdapterModel, SanAdaptersModel from sensors import SensorsModel from users import UsersModel, UserModel from kimchi import config from kimchi.basemodel import BaseModel from kimchi.objectstore import ObjectStore class GingerModel(BaseModel): def __init__(self): objstore_loc = config.get_object_store() + '_ginger' self._objstore = ObjectStore(objstore_loc) sub_models = [] firmware = FirmwareModel() powerprofiles = PowerProfilesModel() powerprofile = PowerProfileModel() users = UsersModel() user = UserModel() interfaces = InterfacesModel() interface = InterfaceModel() network = NetworkModel() archives = ArchivesModel(objstore=self._objstore) archive = ArchiveModel(objstore=self._objstore) backup = BackupModel(objstore=self._objstore, archives_model=archives, archive_model=archive) san_adapters = SanAdaptersModel() san_adapter = SanAdapterModel() sensors = SensorsModel() ibm_sep = SepModel() features = [firmware, backup, network, powerprofiles, san_adapters, sensors, ibm_sep, users] capabilities = CapabilitiesModel(features) sub_models = [ backup, archives, archive, firmware, interfaces, interface, network, powerprofiles, powerprofile, users, user, san_adapters, san_adapter, sensors, ibm_sep, capabilities] super(GingerModel, self).__init__(sub_models) ginger-1.3.0.1/models/network.py000066400000000000000000000131541247135605500164670ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from collections import namedtuple import libvirt from ipaddr import IPv4Network from threading import Timer from interfaces import InterfaceModel from kimchi.exception import OperationFailed from kimchi.model.libvirtconnection import LibvirtConnection from kimchi.network import get_dev_netaddr from kimchi.utils import run_command RESOLV_CONF = '/etc/resolv.conf' Route = namedtuple('Route', ['prefix', 'gateway', 'dev']) class NetworkModel(object): _confirm_timeout = 10.0 def lookup(self, name): return {'nameservers': self._get_nameservers(), 'gateway': self._get_default_gateway()} def _get_nameservers(self): try: with open(RESOLV_CONF) as f: return [line.split()[1] for line in f if line.startswith('nameserver')] except IOError as e: raise OperationFailed('GINNET0001E', {'reason': e.message}) def _set_nameservers(self, nameservers): try: with open(RESOLV_CONF, 'w') as f: f.write(''.join('nameserver %s\n' % server for server in nameservers)) except IOError as e: raise OperationFailed('GINNET0002E', {'reason': e.message}) def _get_default_route_entry(self): # Default route entry reads like this: # default via 9.115.126.1 dev wlp3s0 proto static metric 1024 out, err, rc = run_command(['ip', '-4', 'route', 'list', 'match', '0/0']) if not rc: if out: routes = [line.split() for line in out.split('\n')] return next(Route(r[0], r[2], r[4]) for r in routes) else: return None else: raise OperationFailed('GINNET0009E', {'err': err}) def _get_default_gateway(self): route = self._get_default_route_entry() return route.gateway if route is not None else None def _set_default_gateway(self, gateway): old_route = self._get_default_route_entry() if old_route is None: old_gateway, old_iface = None, None else: old_gateway, old_iface = old_route.gateway, old_route.dev _, err, rc = run_command(['ip', 'route', 'del', 'default']) if rc and not ('No such process' in err): raise OperationFailed('GINNET0010E', {'reason': err}) _, err, rc = run_command(['ip', 'route', 'add', 'default', 'via', gateway]) if rc: raise OperationFailed('GINNET0011E', {'reason': err}) self._save_gateway_changes(old_iface, old_gateway) def _save_gateway_changes(self, old_iface, old_gateway): def save_config(conn, iface, gateway=None): n = IPv4Network(get_dev_netaddr(iface)) net_params = {'ipaddr': str(n.ip), 'netmask': str(n.netmask)} if gateway: net_params['gateway'] = gateway iface_xml = InterfaceModel()._create_iface_xml(iface, net_params) iface = conn.interfaceDefineXML(iface_xml) route = self._get_default_route_entry() gateway = route.gateway new_iface = route.dev conn = LibvirtConnection("qemu:///system").get() conn.changeBegin() save_config(conn, new_iface, gateway) if old_iface and new_iface != old_iface: save_config(conn, old_iface) self._rollback_timer = Timer( self._confirm_timeout, self._rollback_on_failure, args=[old_gateway]) self._rollback_timer.start() def update(self, name, params): if 'nameservers' in params: self._set_nameservers(params['nameservers']) if 'gateway' in params: self._set_default_gateway(params['gateway']) def _rollback_on_failure(self, gateway): _, err, rc = run_command(['ip', 'route', 'del', 'default']) if rc and not ('No such process' in err): raise OperationFailed('GINNET0010E', {'reason': err}) if gateway: _, err, rc = run_command(['ip', 'route', 'add', 'default', 'via', gateway]) if rc: raise OperationFailed('GINNET0011E', {'reason': err}) conn = LibvirtConnection("qemu:///system").get() try: conn.changeRollback() except libvirt.libvirtError as e: # In case the timeout thread is preempted, and confirm_change() is # called before our changeRollback(), we can just ignore the # VIR_ERR_OPERATION_INVALID error. if e.get_error_code() != libvirt.VIR_ERR_OPERATION_INVALID: raise def confirm_change(self, _name): self._rollback_timer.cancel() conn = LibvirtConnection("qemu:///system").get() conn.changeCommit() ginger-1.3.0.1/models/powermanagement.py000066400000000000000000000075311247135605500201710ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from kimchi.exception import OperationFailed from kimchi.utils import kimchi_log from kimchi.utils import run_command class PowerProfilesModel(object): """ The model class for power saving profiles of the host """ def __init__(self): self.error = None # Check if running with any distro other than # RHEL/Fedora, where the 'tuned-adm' package exists. # The idea is to check by the existence of 'yum' # to take care of Ubuntu/Debian verification, and then # check yum to see if the package is installed. yum_cmd = ["yum", "--version"] output, err, returncode = run_command(yum_cmd) if output is None: self.error = 'GINPOWER001E' else: tuned_cmd = ["tuned-adm", "active"] output, err, returncode = run_command(tuned_cmd) # return code '2' at 'tuned-adm active' means that # the tuned daemon is not active if returncode == 2: self.error = 'GINPOWER002E' elif output is None: self.error = 'GINPOWER003E' def get_list(self): if self.error is not None: kimchi_log.error(self.error) raise OperationFailed(self.error) profiles = [] tuned_cmd = ["tuned-adm", "list"] output, error, returncode = run_command(tuned_cmd) lines_output = output.rstrip("\n").split("\n") for line in lines_output: if line.startswith('-'): line = line.strip("- ") profiles.append(line) return profiles def is_feature_available(self): output, error, returncode = run_command(['tuned-adm']) return returncode == 0 class PowerProfileModel(object): """ The model class to represent a single power saving profile. """ def _get_active_powersaving_profile(self): tuned_cmd = ["tuned-adm", "active"] output, error, returncode = run_command(tuned_cmd) # This is a possible scenario where tuned is running # but there is no active profile yet. No need to # report/issue an error. if returncode != 0: return None output = output.split() return output[-1].rstrip() def __init__(self): self.active_powerprofile = self._get_active_powersaving_profile() def lookup(self, powerprofile): is_active = self.active_powerprofile == powerprofile return {"name": powerprofile, "active": is_active} def update(self, powerprofile, params): if params['active'] and self.active_powerprofile != powerprofile: self.active_powerprofile = powerprofile tuned_cmd = ["tuned-adm", "profile", powerprofile] output, error, returncode = run_command(tuned_cmd) if returncode != 0: kimchi_log.error('Could not activate power profile %s, ' 'error: %s', powerprofile, error) raise OperationFailed("GINPOWER004E", {'profile': powerprofile}) return powerprofile ginger-1.3.0.1/models/sanadapters.py000066400000000000000000000035611247135605500173040ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import os from kimchi.exception import NotFoundError FC_HOST_SYS_PATH = '/sys/class/fc_host/%s' FC_HOST_INFOS = {'wwpn': '/port_name', 'wwnn': '/node_name', 'max_vports': '/max_npiv_vports', 'vports_inuse': '/npiv_vports_inuse', 'state': '/port_state', 'speed': '/speed', 'symbolic_name': '/symbolic_name'} class SanAdaptersModel(object): def get_list(self): try: return os.listdir(FC_HOST_SYS_PATH % '') except: return [] class SanAdapterModel(object): def _read_info(self, fpath): try: with open(fpath) as f: return f.read().strip() except: return 'Unknown' def lookup(self, name): if not os.path.isdir(FC_HOST_SYS_PATH % name): raise NotFoundError('GINADAP0001E', {'adapter': name}) info = {} for key in FC_HOST_INFOS: info[key] = self._read_info(FC_HOST_SYS_PATH % name + FC_HOST_INFOS[key]) return info ginger-1.3.0.1/models/sensors.py000066400000000000000000000205201247135605500164650ustar00rootroot00000000000000# -*- coding: utf8 -*- # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import re import cherrypy from collections import OrderedDict from kimchi.utils import kimchi_log from kimchi.utils import run_command class SensorsModel(object): """ The model class for polling host sensor data """ def lookup(self, params): def convert_units(dev_name, sensor_line, temperature_unit): """ Do three things: 1. Convert from C to F if needed. 2. Make all numbers floats. 3. Make sure no 'max' temp is 0. """ fallback_max = 100.0 if temperature_unit == 'C' else 212.0 name = sensor_line[0] val = float(sensor_line[1]) if 'fan' not in dev_name and \ 'power' not in dev_name: if(abs(val) < 1): if "max" in name: val = fallback_max elif "alarm" in name: # unwise to modify '0' alarm val val = 0.0 elif(temperature_unit == 'F'): val = 9.0/5.0 * val + 32 return (name, val) def parse_sensors(temperature_unit): command = ['sensors', '-u'] sens_out, error, rc = run_command(command) if rc: kimchi_log.error("Error retrieving sensors data: %s: %s." % (error, rc)) devices = OrderedDict() for section in sens_out.split('\n\n'): """ A device consists of possibly multiple sensors, each with a possible current, max, alarm, and critical temp, or just a current and max (for fans, for example). Each is broken into sections separated by a blank line, and will have two headings: amb-temp-sensor-isa-0000 Adapter: ISA adapter """ # The first line of each device section is the device name, # e.g., amb-temp-sensor-isa-0000 dev_name, sep, section = section.partition('\n') sub_devices = OrderedDict() """ Two sub-devices of a CPU device: Physical id 0: temp1_input: 48.000 temp1_max: 87.000 temp1_crit: 105.000 temp1_crit_alarm: 0.000 Core 0: temp2_input: 48.000 temp2_max: 87.000 temp2_crit: 105.000 temp2_crit_alarm: 0.000 """ if dev_name is not '': # The second line, e.g. Adapter: ISA adapter, isn't # unique, so it is discarded. throw_away, sep, section = section.partition('\n') # A device may have multiple sub-devices, listed # in separate groups. Split this section/device # into lines to parse each sub-device. # Each sub-device (e.g. Core 0) has a unique sensor. device = section.splitlines() sensor_name = '' sensor = [] # Parse backwards, because you don't want to add a # new device to the dict until you have all sub- # device sensors. for line in reversed(device): try: # Get all ':'-separated elements from a line. # This may be the name of the sub-device, # or a name:value pair for a temp. data_line = line.split(': ') data_line = [x.strip().strip(':') for x in data_line] if len(data_line) > 1: # name:value pair sensor.append(convert_units( dev_name, data_line, temperature_unit)) else: # Sub-device name sensor_name = data_line[0] sub_devices[sensor_name] = \ OrderedDict(reversed(sensor)) sensor = [] except Exception: pass """ Add the entire device (e.g. all cores and their max, min, crit, alarm) as one dict. Reverse it so that fans, CPUs, etc. are in order. """ devices[dev_name] = \ OrderedDict(reversed(sub_devices.items())) # Also add the unit for the device: unit = temperature_unit if 'fan' in sensor_name: unit = 'RPM' elif 'power' in sensor_name: unit = 'W' devices[dev_name]['unit'] = unit return devices def parse_hdds(temperature_unit): # hddtemp will strangely convert a non-number (see error case # below) to 32 deg F. So just always ask for C and convert later. out, error, rc = run_command(['hddtemp']) if rc: kimchi_log.error("Error retrieving HD temperatures: rc %s." "output: %s" % (rc, error)) return None hdds = OrderedDict() for hdd in out.splitlines(): hdd_name = '' hdd_temp = 0.0 try: hdd_items = hdd.split(':') hdd_name, hdd_temp = hdd_items[0], hdd_items[2] hdd_temp = re.sub('°[C|F]', '', hdd_temp).strip() except Exception as e: kimchi_log.error('Sensors hdd parse error: %s' % e.message) continue try: # Try to convert the number to a float. If it fails, # don't add this disk to the list. hdd_temp = float(hdd_temp) if(temperature_unit == 'F'): hdd_temp = 9.0/5.0 * hdd_temp + 32 hdds[hdd_name] = hdd_temp except ValueError: # If no sensor data, parse float will fail. For example: # "/dev/sda: IBM IPR-10 5D831200: S.M.A.R.T. not available" kimchi_log.warning("Sensors hdd: %s" % hdd) hdds['unit'] = temperature_unit return hdds # Don't store the unit parameter passed in permanently so that # the setting stored in the config file is what everyone will # see, and the UI will not bounce between 'C' and 'F' if # a lot of querying is going on from different sources. self.temperature_unit =\ cherrypy.request.app.config['unit']['temperature'] override_unit = None if params is not None: override_unit = params.get('temperature_unit') cur_unit = self.temperature_unit if override_unit is None \ else override_unit sensors = parse_sensors(cur_unit) hdds = parse_hdds(cur_unit) return {'sensors': sensors, 'hdds': hdds} def is_feature_available(self): output, error, returncode = run_command(['sensors', '-u']) return returncode == 0 ginger-1.3.0.1/models/users.py000066400000000000000000000156371247135605500161470ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import grp import os import pwd import libuser from kimchi.exception import OperationFailed from kimchi.utils import kimchi_log SUDOERS_FILE = '/etc/sudoers.d/%s_conf' SUDOERS_LINE = '%s\tALL=(ALL)\tALL\n' class UsersModel(object): """ The model class for basic management of users in the host system """ def create(self, params): adm = libuser.admin() profile = params['profile'] # Login/Group already in use ? user = adm.lookupUserByName(params['name']) group = adm.lookupGroupByName(params['group']) if user: msg = 'User/Login "%s" already in use' % params['name'] kimchi_log.error(msg) raise OperationFailed('GINUSER0008E', {'user': params['name']}) # Adding user/group try: new_user = adm.initUser(params['name']) # Handling user shell according to profile, else, use default shell if profile == "kimchiuser": new_user[libuser.LOGINSHELL] = '/sbin/nologin' # Creating group or adding user to existing group if group is None: new_group = adm.initGroup(params['group']) gid = new_group[libuser.GIDNUMBER] adm.addGroup(new_group) else: gid = adm.lookupGroupByName(params['group']).get('pw_gid')[0] new_user[libuser.GIDNUMBER] = gid adm.addUser(new_user) # Password should come encrypted adm.setpassUser(new_user, params['password'], True) except Exception as e: kimchi_log.error('Could not create user %s', params['name'], e) raise OperationFailed('GINUSER0009E', {'user': params['name']}) # Handle profiles if profile in ["virtuser", "admin"]: self._add_user_to_kvm_group(adm, params['name']) if profile == "admin": self._add_user_to_sudoers(params['name']) return params['name'] def _add_user_to_sudoers(self, user): try: # Creates the file in /etc/sudoers.d with proper user permission with open(SUDOERS_FILE % user, 'w') as f: f.write(SUDOERS_LINE % user) os.chmod(SUDOERS_FILE % user, 0440) except Exception as e: UserModel().delete(user) kimchi_log.error('Could not add user %s to sudoers: %s', user, e.message) raise OperationFailed('GINUSER0007E', {'user': user}) def _add_user_to_kvm_group(self, adm, user): # Add new user to KVM group kvmgrp = adm.lookupGroupByName('kvm') kvmgrp.add('gr_mem', user) ret = adm.modifyGroup(kvmgrp) if ret != 1: UserModel().delete(user) msg = ('Could not add user %s to kvm group. Operation failed.' % user) kimchi_log.error(msg) raise OperationFailed('GINUSER0006E', {'user': user}) def get_list(self): # Get list of users in the host excluding system users return [user.pw_name for user in pwd.getpwall() if user.pw_uid >= 1000] class UserModel(object): def delete(self, user): adm = libuser.admin() user_obj = adm.lookupUserByName(user) # Check if user exist if user_obj is None: kimchi_log.error('User "%s" does not exist', user) raise OperationFailed('GINUSER0011E', {'user': user}) group_obj = adm.lookupGroupById(int(user_obj.get('pw_gid')[0])) # Delete user with its home and mails too try: adm.deleteUser(user_obj, True, True) except Exception as e: kimchi_log.error('Could not delete user %s: %s', user, e) raise OperationFailed('GINUSER0010E', {'user': user}) # Handle user according to its profile self._delete_profile_settings(user) # Delete group if no users are assigned to it # It is not possible to delete user/group at same time if group_obj is None: msg = 'Group for user "%s" does not exist for removal' % user kimchi_log.warn(msg) raise OperationFailed('GINUSER0013E', {'user': user}) group = group_obj.get('gr_name')[0] if not adm.enumerateUsersByGroup(group): try: adm.deleteGroup(group_obj) except Exception as e: kimchi_log.error('Could not delete group "%s": %s', group, e) raise OperationFailed('GINUSER0012E', {'group': group}) def lookup(self, user): try: user_info = pwd.getpwnam(user) except Exception: kimchi_log.error('User "%s" does not exist', user) raise OperationFailed('GINUSER0011E', {'user': user}) return {"name": user, "uid": user_info.pw_uid, "gid": user_info.pw_gid, "group": grp.getgrgid(user_info.pw_gid).gr_name, "profile": self._get_user_profile(user)} def _get_user_profile(self, user): # ADMIN: Check /etc/sudoers.d if os.path.isfile(SUDOERS_FILE % user): return 'admin' # VIRTUSER: Check kvm group adm = libuser.admin() kvmgrp = adm.lookupGroupByName('kvm') if user in kvmgrp.get('gr_mem'): return 'virtuser' # KIMCHIUSER: If not any before return 'kimchiuser' def _delete_profile_settings(self, user): profile = self._get_user_profile(user) if profile == 'kimchiuser': return # Removing from sudoers elif profile == 'admin': f = SUDOERS_FILE % user try: os.unlink(f) except Exception as e: kimchi_log.error('Error removing file "%s": %s', f, e) # Finally remove from kvm group try: adm = libuser.admin() kvmgrp = adm.lookupGroupByName('kvm') # Remove all ocurrences members = set(kvmgrp.get('gr_mem')) - set([user]) kvmgrp.set('gr_mem', list(members)) adm.modifyGroup(kvmgrp) except Exception as e: kimchi_log.error('Error while removing user from kvm group: %s', e) ginger-1.3.0.1/po/000077500000000000000000000000001247135605500135535ustar00rootroot00000000000000ginger-1.3.0.1/po/LINGUAS000066400000000000000000000000221247135605500145720ustar00rootroot00000000000000en_US pt_BR zh_CN ginger-1.3.0.1/po/Makefile.in.in000066400000000000000000000344701247135605500162350ustar00rootroot00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.18.3 GETTEXT_MACRO_VERSION = 0.18 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SED = @SED@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @datadir@/kimchi/plugins/ginger/mo gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in gen-pot.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. CHECK_MACRO_VERSION = \ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in $(srcdir)/gen-pot $(POTFILES) # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ginger-1.3.0.1/po/Makevars000066400000000000000000000044411247135605500152520ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = ginger # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = kimchi@linux.vnet.ibm.com # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' # context. Possible values are "yes" and "no". Set this to yes if the # package uses functions taking also a message context, like pgettext(), or # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. USE_MSGCTXT = no # These options get passed to msgmerge. # Useful options are in particular: # --previous to keep previous msgids of translated messages, # --quiet to reduce the verbosity. MSGMERGE_OPTIONS = ginger-1.3.0.1/po/POTFILES.in000066400000000000000000000000321247135605500153230ustar00rootroot00000000000000./ui/pages/*.tmpl i18n.py ginger-1.3.0.1/po/Rules-quot000066400000000000000000000034111247135605500155550ustar00rootroot00000000000000# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header ginger-1.3.0.1/po/boldquot.sed000066400000000000000000000003311247135605500160760ustar00rootroot00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g ginger-1.3.0.1/po/en@boldquot.header000066400000000000000000000024711247135605500172050ustar00rootroot00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # ginger-1.3.0.1/po/en@quot.header000066400000000000000000000022631247135605500163430ustar00rootroot00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # ginger-1.3.0.1/po/en_US.po000066400000000000000000000106741247135605500151340ustar00rootroot00000000000000# English translations for Ginger package. # Copyright (C) 2014 IBM, Corp. # This file is distributed under the same license as the Ginger package. # Zhou Zheng Sheng , 2014. # msgid "" msgstr "" "Project-Id-Version: Ginger 1.2.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 16:26+0800\n" "PO-Revision-Date: 2014-06-22 14:00+0800\n" "Last-Translator: Zhou Zheng Sheng \n" "Language-Team: Zhou Zheng Sheng \n" "Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "Firmware Update" msgstr "" msgid "" "Firmware update is initializing. System will reboot in order to flash the " "firmware." msgstr "" msgid "Firmware Version: " msgstr "" msgid "Package Path: " msgstr "" msgid "The absolute path to the firmware rpm." msgstr "" msgid "Update" msgstr "" msgid "Configuration Backup" msgstr "" msgid "File" msgstr "" msgid "Timestamp" msgstr "" msgid "Description" msgstr "" msgid "Path Included" msgstr "" msgid "Path Excluded" msgstr "" msgid "Preserve the latest" msgstr "" msgid "backups" msgstr "" msgid "days of backups" msgstr "" msgid "Administration" msgstr "" #, python-format msgid "Failed to read /etc/resolv.conf because %(reason)s" msgstr "" #, python-format msgid "Failed to write /etc/resolv.conf because %(reason)s" msgstr "" #, python-format msgid "Invalid network parameters. Details: %(err)s" msgstr "" #, python-format msgid "Unable to update interface configuration. Details: %(err)s" msgstr "" msgid "Invalid parameter for DNS servers" msgstr "" msgid "Invalid parameter for interface ip address" msgstr "" msgid "Invalid parameter for interface netmask" msgstr "" msgid "Invalid parameter for network gateway" msgstr "" #, python-format msgid "Unable to get default gateway: %(err)s" msgstr "" #, python-format msgid "Unable to delete default gateway: %(err)s" msgstr "" #, python-format msgid "Unable to set default gateway: %(err)s" msgstr "" msgid "Specify name, password, group and profile for the new user." msgstr "" msgid "User name is a required string." msgstr "" msgid "User password is a required string." msgstr "" msgid "User group is a required string." msgstr "" msgid "" "User profile is required and should be one among kimchiuser, virtuser or " "admin." msgstr "" #, python-format msgid "Could not add user '%(user)s' to kvm group." msgstr "" #, python-format msgid "Could not add user '%(user)s' to sudoers list." msgstr "" #, python-format msgid "The user name '%(user)s' is already in use'." msgstr "" #, python-format msgid "Could not create user '%(user)s'." msgstr "" #, python-format msgid "Could not delete user '%(user)s'." msgstr "" #, python-format msgid "User '%(user)s' does not exist." msgstr "" #, python-format msgid "Could not delete group '%(group)s'" msgstr "" #, python-format msgid "Group for user '%(user)s' does not exist for removal." msgstr "" msgid "Cannot update system firmware while running VMs." msgstr "" #, python-format msgid "Firmware image unpack failed: rc = %(rc)s. Details: %(err)s" msgstr "" msgid "FW update failed: No image file found in the package file." msgstr "" #, python-format msgid "" "Error flashing firmware. rc = %(rc)s. Please see /usr/" "sbin/update_flash for rc reasons." msgstr "" #, python-format msgid "" "Error commiting firmware. rc = %(rc)s. Ensure you are " "booted to the temporary side." msgstr "" #, python-format msgid "" "Error rejecting firmware. rc = %(rc)s. Ensure you are " "booted to the permanent side." msgstr "" #, python-format msgid "" "Failed to create tar archive \"%(name)s\", cmd: \"%(cmd)s\". Inspect error " "log for more information." msgstr "" #, python-format msgid "Failed to delete archive file \"%(name)s\"." msgstr "" #, python-format msgid "" "Failed to create archive dir \"%(dir)s\". Inspect error log for more " "information." msgstr "" msgid "Description too long." msgstr "" msgid "Please check the uniqueness of the paths or patterns." msgstr "" msgid "Path or pattern is too long or too short." msgstr "" msgid "Invalid days_ago number." msgstr "" msgid "Invalid counts_ago number." msgstr "" #, python-format msgid "" "Failed to create archive \"%(identity)s\". Inspect error log for more " "information." msgstr "" #, python-format msgid "SAN adapter '%(adapter)s' does not exist in the system." msgstr "" ginger-1.3.0.1/po/gen-pot.in000066400000000000000000000003041247135605500154510ustar00rootroot00000000000000#!/bin/bash for src in $@; do if [ ${src: -3} == ".py" ]; then cat $src else cat $src | @CHEETAH@ compile - fi done | xgettext --no-location -o ginger.pot -L Python - ginger-1.3.0.1/po/ginger.pot000066400000000000000000000106101247135605500155500ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 16:13+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" msgid "Firmware Update" msgstr "" msgid "" "Firmware update is initializing. System will reboot in order to flash the " "firmware." msgstr "" msgid "Firmware Version: " msgstr "" msgid "Package Path: " msgstr "" msgid "The absolute path to the firmware rpm." msgstr "" msgid "Update" msgstr "" msgid "Configuration Backup" msgstr "" msgid "File" msgstr "" msgid "Timestamp" msgstr "" msgid "Description" msgstr "" msgid "Path Included" msgstr "" msgid "Path Excluded" msgstr "" msgid "Preserve the latest" msgstr "" msgid "backups" msgstr "" msgid "days of backups" msgstr "" msgid "Administration" msgstr "" #, python-format msgid "Failed to read /etc/resolv.conf because %(reason)s" msgstr "" #, python-format msgid "Failed to write /etc/resolv.conf because %(reason)s" msgstr "" #, python-format msgid "Invalid network parameters. Details: %(err)s" msgstr "" #, python-format msgid "Unable to update interface configuration. Details: %(err)s" msgstr "" msgid "Invalid parameter for DNS servers" msgstr "" msgid "Invalid parameter for interface ip address" msgstr "" msgid "Invalid parameter for interface netmask" msgstr "" msgid "Invalid parameter for network gateway" msgstr "" #, python-format msgid "Unable to get default gateway: %(err)s" msgstr "" #, python-format msgid "Unable to delete default gateway: %(err)s" msgstr "" #, python-format msgid "Unable to set default gateway: %(err)s" msgstr "" msgid "Specify name, password, group and profile for the new user." msgstr "" msgid "User name is a required string." msgstr "" msgid "User password is a required string." msgstr "" msgid "User group is a required string." msgstr "" msgid "" "User profile is required and should be one among kimchiuser, virtuser or " "admin." msgstr "" #, python-format msgid "Could not add user '%(user)s' to kvm group." msgstr "" #, python-format msgid "Could not add user '%(user)s' to sudoers list." msgstr "" #, python-format msgid "The user name '%(user)s' is already in use'." msgstr "" #, python-format msgid "Could not create user '%(user)s'." msgstr "" #, python-format msgid "Could not delete user '%(user)s'." msgstr "" #, python-format msgid "User '%(user)s' does not exist." msgstr "" #, python-format msgid "Could not delete group '%(group)s'" msgstr "" #, python-format msgid "Group for user '%(user)s' does not exist for removal." msgstr "" msgid "Cannot update system firmware while running VMs." msgstr "" #, python-format msgid "Firmware image unpack failed: rc = %(rc)s. Details: %(err)s" msgstr "" msgid "FW update failed: No image file found in the package file." msgstr "" #, python-format msgid "" "Error flashing firmware. rc = %(rc)s. Please see /usr/" "sbin/update_flash for rc reasons." msgstr "" #, python-format msgid "" "Error commiting firmware. rc = %(rc)s. Ensure you are " "booted to the temporary side." msgstr "" #, python-format msgid "" "Error rejecting firmware. rc = %(rc)s. Ensure you are " "booted to the permanent side." msgstr "" #, python-format msgid "" "Failed to create tar archive \"%(name)s\", cmd: \"%(cmd)s\". Inspect error " "log for more information." msgstr "" #, python-format msgid "Failed to delete archive file \"%(name)s\"." msgstr "" #, python-format msgid "" "Failed to create archive dir \"%(dir)s\". Inspect error log for more " "information." msgstr "" msgid "Description too long." msgstr "" msgid "Please check the uniqueness of the paths or patterns." msgstr "" msgid "Path or pattern is too long or too short." msgstr "" msgid "Invalid days_ago number." msgstr "" msgid "Invalid counts_ago number." msgstr "" #, python-format msgid "" "Failed to create archive \"%(identity)s\". Inspect error log for more " "information." msgstr "" #, python-format msgid "SAN adapter '%(adapter)s' does not exist in the system." msgstr "" ginger-1.3.0.1/po/insert-header.sin000066400000000000000000000012401247135605500170150ustar00rootroot00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ginger-1.3.0.1/po/pt_BR.po000066400000000000000000000156031247135605500151260ustar00rootroot00000000000000# Brazilian Portuguese translations for Ginger package. # Copyright (C) 2014 IBM, Corp. # This file is distributed under the same license as the Ginger package. # Zhou Zheng Sheng , 2014. # msgid "" msgstr "" "Project-Id-Version: Ginger 1.2.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 16:26+0800\n" "PO-Revision-Date: 2014-06-22 14:00+0800\n" "Last-Translator: Paulo Vital \n" "Language-Team: Paulo Vital \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "Firmware Update" msgstr "Atualização de Firmware" msgid "" "Firmware update is initializing. System will reboot in order to flash the " "firmware." msgstr "" "A atualização de firmware está sendo inicializada. O sistema será " "reinicializado para atualizar o firmware." msgid "Firmware Version: " msgstr "Versão de Firmware: " msgid "Package Path: " msgstr "Caminho do Pacote: " msgid "The absolute path to the firmware rpm." msgstr "O caminho absoluto para o rpm do firmware." msgid "Update" msgstr "Atualizar" msgid "Configuration Backup" msgstr "Backup de configuração" msgid "File" msgstr "Arquivo" msgid "Timestamp" msgstr "Registro de data e hora" msgid "Description" msgstr "Descrição" msgid "Path Included" msgstr "Caminho incluído" msgid "Path Excluded" msgstr "Caminho excluído" msgid "Preserve the latest" msgstr "" msgid "backups" msgstr "backups" msgid "days of backups" msgstr "dias de backups" msgid "Administration" msgstr "Administração" #, python-format msgid "Failed to read /etc/resolv.conf because %(reason)s" msgstr "Falha ao ler /etc/resolv.conf por causa de %(reason)s" #, python-format msgid "Failed to write /etc/resolv.conf because %(reason)s" msgstr "Falha ao gravar /etc/resolv.conf por causa de %(reason)s" #, python-format msgid "Invalid network parameters. Details: %(err)s" msgstr "Parâmetros de rede inválidos. Detalhes: %(err)s" #, python-format msgid "Unable to update interface configuration. Details: %(err)s" msgstr "" "Não é possível atualizar a configuração da interface. Detalhes: %(err)s" msgid "Invalid parameter for DNS servers" msgstr "Parâmetro inválido para servidores do Sistema de Nomes de Domínio" msgid "Invalid parameter for interface ip address" msgstr "Parâmetro inválido para o endereço IP da interface" msgid "Invalid parameter for interface netmask" msgstr "Parâmetro inválido para a máscara de rede da interface" msgid "Invalid parameter for network gateway" msgstr "Parâmetro inválido para o gateway de rede" #, python-format msgid "Unable to get default gateway: %(err)s" msgstr "" #, python-format msgid "Unable to delete default gateway: %(err)s" msgstr "" #, python-format msgid "Unable to set default gateway: %(err)s" msgstr "" msgid "Specify name, password, group and profile for the new user." msgstr "Especifique o nome, a senha, o grupo e o perfil para o novo usuário." msgid "User name is a required string." msgstr "Nome de usuário é uma sequência necessária." msgid "User password is a required string." msgstr "Senha do usuário é uma sequência necessária." msgid "User group is a required string." msgstr "Grupo de usuários é uma sequência necessária." msgid "" "User profile is required and should be one among kimchiuser, virtuser or " "admin." msgstr "" "O perfil do usuário é necessário e deve ser um entre kimchiuser, virtuser ou " "admin." #, python-format msgid "Could not add user '%(user)s' to kvm group." msgstr "Não foi possível incluir o usuário '%(user)s' no grupo kvm." #, python-format msgid "Could not add user '%(user)s' to sudoers list." msgstr "Não foi possível incluir o usuário '%(user)s' na lista de sudoers." #, python-format msgid "The user name '%(user)s' is already in use'." msgstr "O nome de usuário '%(user)s' já está sendo usado." #, python-format msgid "Could not create user '%(user)s'." msgstr "Não foi possível criar o usuário '%(user)s'." #, python-format msgid "Could not delete user '%(user)s'." msgstr "Não foi possível excluir o usuário '%(user)s'." #, python-format msgid "User '%(user)s' does not exist." msgstr "O usuário '%(user)s' não existe." #, python-format msgid "Could not delete group '%(group)s'" msgstr "Não foi possível excluir o grupo '%(group)s'" #, python-format msgid "Group for user '%(user)s' does not exist for removal." msgstr "O grupo para o usuário '%(user)s' não existe para remoção." msgid "Cannot update system firmware while running VMs." msgstr "Não é possível atualizar o firmware do sistema ao executar VMs." #, python-format msgid "Firmware image unpack failed: rc = %(rc)s. Details: %(err)s" msgstr "" "Falha na descompactação da imagem de firmware: rc = %(rc)s. Detalhes: %(err)s" msgid "FW update failed: No image file found in the package file." msgstr "" "Falha na atualização do FW: Nenhum arquivo de imagem localizado no arquivo " "do pacote." #, python-format msgid "" "Error flashing firmware. rc = %(rc)s. Please see /usr/" "sbin/update_flash for rc reasons." msgstr "" "Erro ao atualizar o firmware. rc = %(rc)s. Consulte /" "usr/sbin/update_flash para obter os motivos dos códigos de retorno." #, python-format msgid "" "Error commiting firmware. rc = %(rc)s. Ensure you are " "booted to the temporary side." msgstr "" #, python-format msgid "" "Error rejecting firmware. rc = %(rc)s. Ensure you are " "booted to the permanent side." msgstr "" #, python-format msgid "" "Failed to create tar archive \"%(name)s\", cmd: \"%(cmd)s\". Inspect error " "log for more information." msgstr "" "Falha ao criar o archive tar \"%(name)s\", cmd: \"%(cmd)s\". Inspecione o " "log de erro para obter mais informações." #, python-format msgid "Failed to delete archive file \"%(name)s\"." msgstr "Falha ao excluir o archive \"%(name)s\"." #, python-format msgid "" "Failed to create archive dir \"%(dir)s\". Inspect error log for more " "information." msgstr "" "Falha ao criar o dir do archive \"%(dir)s\". Inspecione o log de erro para " "obter mais informações." msgid "Description too long." msgstr "Descrição muito longa." msgid "Please check the uniqueness of the paths or patterns." msgstr "Verifique a exclusividade dos caminhos ou padrões." msgid "Path or pattern is too long or too short." msgstr "O caminho ou o padrão é muito longo ou muito curto." msgid "Invalid days_ago number." msgstr "Número de days_ago inválido." msgid "Invalid counts_ago number." msgstr "Número de counts_ago inválido." #, python-format msgid "" "Failed to create archive \"%(identity)s\". Inspect error log for more " "information." msgstr "" "Falha ao criar o archive \"%(identity)s\". Inspecione o log de erro para " "obter mais informações." #, python-format msgid "SAN adapter '%(adapter)s' does not exist in the system." msgstr "" ginger-1.3.0.1/po/quot.sed000066400000000000000000000002311247135605500152340ustar00rootroot00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g ginger-1.3.0.1/po/remove-potcdate.sin000066400000000000000000000006601247135605500173660ustar00rootroot00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ginger-1.3.0.1/po/zh_CN.po000066400000000000000000000151731247135605500151230ustar00rootroot00000000000000# Simplified Chinese translations for Ginger package. # Copyright (C) 2014 IBM, Corp. # This file is distributed under the same license as the Ginger package. # Zhou Zheng Sheng , 2014. # msgid "" msgstr "" "Project-Id-Version: Ginger 1.2.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-22 16:26+0800\n" "PO-Revision-Date: 2014-06-22 14:00+0800\n" "Last-Translator: Zhou Zheng Sheng \n" "Language-Team: Zhou Zheng Sheng \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "Firmware Update" msgstr "固件更新" msgid "" "Firmware update is initializing. System will reboot in order to flash the " "firmware." msgstr "正在初始化固件更新。系统会重新引导以刷新固件。" msgid "Firmware Version: " msgstr "固件版本:" msgid "Package Path: " msgstr "软件包路径:" msgid "The absolute path to the firmware rpm." msgstr "固件 rpm 的绝对路径。" msgid "Update" msgstr "更新" msgid "Configuration Backup" msgstr "配置备份" msgid "File" msgstr "文件" msgid "Timestamp" msgstr "时间戳" msgid "Description" msgstr "描述" msgid "Path Included" msgstr "包含路径" msgid "Path Excluded" msgstr "排除路径" msgid "Preserve the latest" msgstr "" msgid "backups" msgstr "个备份" msgid "days of backups" msgstr "天备份" msgid "Administration" msgstr "管理" #, python-format msgid "Failed to read /etc/resolv.conf because %(reason)s" msgstr "未能读取 /etc/resolv.conf,原因为 %(reason)s" #, python-format msgid "Failed to write /etc/resolv.conf because %(reason)s" msgstr "未能写入 /etc/resolv.conf,原因为 %(reason)s" #, python-format msgid "Invalid network parameters. Details: %(err)s" msgstr "网络参数无效。详细信息:%(err)s" #, python-format msgid "Unable to update interface configuration. Details: %(err)s" msgstr "无法更新接口配置。详细信息:%(err)s" msgid "Invalid parameter for DNS servers" msgstr "DNS 服务器参数无效" msgid "Invalid parameter for interface ip address" msgstr "接口 IP 地址参数无效" msgid "Invalid parameter for interface netmask" msgstr "接口网络掩码参数无效" msgid "Invalid parameter for network gateway" msgstr "网络网关参数无效" #, python-format msgid "Unable to get default gateway: %(err)s" msgstr "无法获得默认网关配置。详细信息:%(err)s" #, python-format msgid "Unable to delete default gateway: %(err)s" msgstr "无法删除默认网关。详细信息:%(err)s" #, python-format msgid "Unable to set default gateway: %(err)s" msgstr "无法设置默认网关。详细信息:%(err)s" msgid "Specify name, password, group and profile for the new user." msgstr "指定新用户的名称、密码、组和概要文件。" msgid "User name is a required string." msgstr "用户名是必需字符串。" msgid "User password is a required string." msgstr "用户密码是必需字符串。" msgid "User group is a required string." msgstr "用户组是必需字符串。" msgid "" "User profile is required and should be one among kimchiuser, virtuser or " "admin." msgstr "" "用户概要文件为必需项,并且应该是 kimchiuser、virtuser 或admin 中的一个。" #, python-format msgid "Could not add user '%(user)s' to kvm group." msgstr "无法将用户“%(user)s”添加到 kvm 组。" #, python-format msgid "Could not add user '%(user)s' to sudoers list." msgstr "无法将用户“%(user)s”添加到 sudoers 列表。" #, python-format msgid "The user name '%(user)s' is already in use'." msgstr "用户名“%(user)s”已在使用中。" #, python-format msgid "Could not create user '%(user)s'." msgstr "无法创建用户“%(user)s”。" #, python-format msgid "Could not delete user '%(user)s'." msgstr "无法删除用户“%(user)s”。" #, python-format msgid "User '%(user)s' does not exist." msgstr "用户“%(user)s”不存在。" #, python-format msgid "Could not delete group '%(group)s'" msgstr "无法删除组“%(group)s”" #, python-format msgid "Group for user '%(user)s' does not exist for removal." msgstr "删除时用户“%(user)s”的组不存在。" msgid "Cannot update system firmware while running VMs." msgstr "运行 VM 时无法更新系统固件。" #, python-format msgid "Firmware image unpack failed: rc = %(rc)s. Details: %(err)s" msgstr "固件映像解包失败:rc = %(rc)s。详细信息:%(err)s" msgid "FW update failed: No image file found in the package file." msgstr "FW 更新失败:软件包文件中未发现任何映像文件。" #, python-format msgid "" "Error flashing firmware. rc = %(rc)s. Please see /usr/" "sbin/update_flash for rc reasons." msgstr "" "刷新固件时发生错误。rc = %(rc)s。 请参阅 /usr/sbin/" "update_flash 以理解 rc 原因。" #, python-format msgid "" "Error commiting firmware. rc = %(rc)s. Ensure you are " "booted to the temporary side." msgstr "提交固件时发生错误。rc = %(rc)s。请确保机器是从临时固件启动的。" #, python-format msgid "" "Error rejecting firmware. rc = %(rc)s. Ensure you are " "booted to the permanent side." msgstr "弹出固件时发生错误。rc = %(rc)s。请确保机器是从持久固件启动的。" #, python-format msgid "" "Failed to create tar archive \"%(name)s\", cmd: \"%(cmd)s\". Inspect error " "log for more information." msgstr "" "未能创建 tar 归档“%(name)s”,命令:“%(cmd)s。检查错误日志以了解更多信息。" #, python-format msgid "Failed to delete archive file \"%(name)s\"." msgstr "未能删除归档文件“%(name)s”。" #, python-format msgid "" "Failed to create archive dir \"%(dir)s\". Inspect error log for more " "information." msgstr "未能创建归档 dir“%(dir)s”。检查错误日志以了解更多信息。" msgid "Description too long." msgstr "描述内容太长。" msgid "Please check the uniqueness of the paths or patterns." msgstr "请检查路径或模式的唯一性。" msgid "Path or pattern is too long or too short." msgstr "路径或模式太长或太短。" msgid "Invalid days_ago number." msgstr "无效 days_ago 数目。" msgid "Invalid counts_ago number." msgstr "无效 counts_ago 数目。" #, python-format msgid "" "Failed to create archive \"%(identity)s\". Inspect error log for more " "information." msgstr "未能创建归档“%(identity)s”。检查错误日志以了解更多信息。" #, python-format msgid "SAN adapter '%(adapter)s' does not exist in the system." msgstr "SAN适配器“%(adapter)s”不存在。" ginger-1.3.0.1/ui/000077500000000000000000000000001247135605500135525ustar00rootroot00000000000000ginger-1.3.0.1/ui/Makefile.am000066400000000000000000000011621247135605500156060ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. SUBDIRS = config css js pages ginger-1.3.0.1/ui/config/000077500000000000000000000000001247135605500150175ustar00rootroot00000000000000ginger-1.3.0.1/ui/config/Makefile.am000066400000000000000000000012631247135605500170550ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. xmldir = $(datadir)/kimchi/plugins/ginger/ui/config dist_xml_DATA = \ tab-ext.xml \ $(NULL) ginger-1.3.0.1/ui/config/tab-ext.xml000066400000000000000000000004041247135605500171030ustar00rootroot00000000000000 Administration plugins/ginger/host-admin.html ginger-1.3.0.1/ui/css/000077500000000000000000000000001247135605500143425ustar00rootroot00000000000000ginger-1.3.0.1/ui/css/Makefile.am000066400000000000000000000013211247135605500163730ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. SUBDIRS = base cssdir = $(datadir)/kimchi/plugins/ginger/ui/css dist_css_DATA = \ ginger.css \ host-admin.css \ $(NULL) ginger-1.3.0.1/ui/css/base/000077500000000000000000000000001247135605500152545ustar00rootroot00000000000000ginger-1.3.0.1/ui/css/base/Makefile.am000066400000000000000000000011451247135605500173110ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. SUBDIRS = images ginger-1.3.0.1/ui/css/base/images/000077500000000000000000000000001247135605500165215ustar00rootroot00000000000000ginger-1.3.0.1/ui/css/base/images/Makefile.am000066400000000000000000000013361247135605500205600ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. imgdir = $(datadir)/kimchi/plugins/ginger/ui/css/base/images dist_img_DATA = \ progress48.gif \ ui-icons_888888_256x240.png \ $(NULL) ginger-1.3.0.1/ui/css/base/images/progress48.gif000066400000000000000000000101221247135605500212240ustar00rootroot00000000000000GIF89a xxx庺ž옘~~~xxx鏏! NETSCAPE2.0!Created with ajaxload.info! , @pH$8Gq$NA3( L VK|P(:(rBь_@X!/ BxBnb}EgorEg^ oWD c JCg oqmo  E  {p~ rD}ŠMdKr 񋇅o |̩ò]qāӤ` 9Cf)$'=Ê}C^u-H.!ܻݧ OK"15.&{jT BBo e6<@B?1 )Gb K ! , @pH$&4Bq$Db(V[4_:t:"rqh@a)ȉgBk_oEg~#rJDgxloWF C ~mg  oD B wK!  CɶwE  ʢdX r s'xM &T$$|MCڟ ABldڵKdV?oFl-X L[J*Ξ6!" 5\@poIm N!QXm@ק %2u:uH2\R#a! , @pH$ Bq$&D(LV [$ :4P( rs_IȉgBxBoE gw^ rFgWoWD cB g oD%# v JEinE ~"#L d$L  X"yrvE ͻd)xWO<2I&1a"UJ(qz +kQ\" *tRjO}C7":sdE& R*"#-=L֯Q2s:d+qV ! , @pH$.Aq4 Bd&"t jQP(.q8Hy"3\HV$QBm{Oe u  pzB eRumTDC W mDCe tB]c~ aVjUUf{ L {[HøU{i98\q *3 n% L\@02T* 9}tI*D9x6ϴF]l"!M!0ըT,D*FT׮pq ! , @pH,*rILGA\&gLEB*.FCУv~,$wSGIr jmgB GTrjTDGWHj\ CG vB da zw% V` E |m%mvL ي` L䩻wہKUbȀ-FA;!:tp_3G8 CE69Pd8@,9J,7p +A`! , @pH,*rILGAQT&gXP$ӭp1r͙Z9| jfB Gi~WeE y }RinlHCqNN ]aGuzC `LjzLgRdz z ʽDU sPLsJ6LHQ V0'hZ%8@@.EDtC lV`XS?X q!+@*-҄FxB \F3֮ ]! , @pH,*rILGAQT&gXP$ӭp1r͙Z9| jE Gi~WeE y#D}R inlHB!$CfC N ]Ej $sLjNszEgdG z z \U jcb  Ӫ\] 2!dZnVTgL0 F 2Tȇ `Ǖ2Fj k XT.5X:) 5,'R,tPuyz*R0|! , @pH,*rI48e*TJ,("Ӂ * GNy#`xDdk\GnEdi C DdS Gm}GIB$J  ^Ea jD xKnxEx GnhaC JV8pIh> KE8D\2$C!"Хj1YB ӂS T@D5d852^I$ ?*aij'T5U*G N:Jlӱ#2a-;ginger-1.3.0.1/ui/css/base/images/ui-icons_888888_256x240.png000066400000000000000000000104211247135605500226440ustar00rootroot00000000000000PNG  IHDRIJPLTE{NtRNS2P."Tp@f` <BHJZ&0R,4j8D|($ blߝF>n~hhHIDATx]b۶H儒-{iZK:glkn-tIqq? E$dK>$>;PZsVh!Sy0E0}H)-t koܪKp\RϠ .E7 ) *V;~Pe Bx*,=$zDؾ JҸٻ9{ ǸHpqW@"2'B[$ @TiH/b٥96!XHq`DE*R HV!%;" i] dddddddd4y5  Rb@(8CdŪݡ,@T@ibrq0alX!pe, =4bW { 5Ƭhu~(Q^@3="b5XC@JCT76q_5 @,r šɩD)T|O@ ON-ՙ [n@RXIm݋(F @?=0puL;g$@6η K`>п @h գKVn"a" %l@.v$/U^ G:#`` uTtK~ŋZ5T%kxk]\*Q ,҇B44 OXK|yg+_M(lоEO V$T1BXb-|?@ fBXr%'@ҹA\IJ,}BBc\V rh(]tI^}oצo S3 ";ʙb}"߰ ){b$Gwwݾab")T@pF_er6JvШ"mޭM-d76x˰6ӥ;/`>KrP\_^u1%OTM.}Q3.Nس})>-w`a+sy$t)NbFFFFBejnNVn4,A*X*5>PGa 3 {oB &<L[ Nc.öi=`Q@d ͆I.Il`\t[< Cit484-r +f쑱BCB MH iy }>rxp|z;BǏ;burcK4tz1G~`ؚK| ̔>ۡO$~ Ao)0pzz }i`;ADm8n:cfA@s7L Z/..h8or? N93B~o_'`opO- :TG L;7]`B%˛>*wTpM0H}&t ^1'Oqr'2P͡+z,tIW''|en=dzgRm[NStK{҉mؓVt6ҲR`ζN&}B U(rۗ&1%Q''?l׸+&r{jN಻4) `N狌. ߭ ǣ)q 2?n3Hb`} .`pqY1e_bu7e+N_F(DT,L}LLrmP5|x芥1cx DAb`M(7NED~Mz +4BXd.Mzv͈Pd8p<6?8N*x.6ڍ6GFZ)O !lSshssNp8`'0/<s}.@Ǩs7ξO۟VDa5av]m1+3y6۠>@u50Ps51==p *KVҫ܂ݻc$N4(Xr2###c- 賟Lδ>]5.sYs1f0;'̨Yg銛{@9 `aC(=%bo2=n1 jBoS$n#m=i0ci9}oI qT]W%.(؅]z\x f"]o'u䫵tk{v;AC3ֆwwR_#X (xҋ/q%W hpk_IX'b/fXKi"#####QCLi2t 5L0 QiH2;yTOok;ע ٶ`RNg{zy!Kxm?A(vU~mL(`o/!nmX-{v[ dw=n「sdwzn(}Oy~ m ?XU;,V'+ V&JRZ]᧭:zC'-߆@y 4u `Vۓwъ#zP@Q N>2/{\o)W~a3xLw :_Q;=pּdt\'8~3SRP6y+XQ*޺r ̗ѭ*޺r gl/\U^u$|mbVnw \V|D͊NVNy7k<;/E}?E*dzgO ~g/96f cD}% g$QG7o)U Jo,O@0߾Q(;bw:5 NwRN5Iy'K?}:9mֽ*@f@jU9mҫÍ{$ؗ}dFp|%!DdF>}G{@FFFFFFƦQܞH 3 u Mo~vy}mwz<7nP9rWku=|_nz쿳}@IXn?sspan { display: inline-block; width: 230px; } .ginger .host-admin .user-manage button { width: 20px; height: 20px; float: right; } .ginger .host-admin .user-manage .content-body .user-item { height: 25px; margin: 2px 0; } .ginger .host-admin .user-manage .content-body .user-manage-column { display: inline-block; width: 230px; font-weight: 400; } #hostUserAdd .user-colume { display: inline-block; } #hostUserAdd .user-add-label>div { margin-top: 14px; } #hostUserAdd .user-add-content .user-input { margin: 7px 0 0 3px; } #hostUserAdd .user-manage-footer { float: right; margin-top: 10px; } .user-add-body .user-add-content .enable-combobox { vertical-align: middle; }ginger-1.3.0.1/ui/js/000077500000000000000000000000001247135605500141665ustar00rootroot00000000000000ginger-1.3.0.1/ui/js/Makefile.am000066400000000000000000000012721247135605500162240ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. jsdir = $(datadir)/kimchi/plugins/ginger/ui/js dist_js_DATA = \ host-admin.js \ util.js \ $(NULL) ginger-1.3.0.1/ui/js/host-admin.js000066400000000000000000001004061247135605500165700ustar00rootroot00000000000000ginger.initBakDialog = function() { $("#newBakDialog").dialog({ autoOpen : false, modal : true, width : 800, height: 600, draggable : false, resizable : false, closeText: "X", open : function(){ $(".ui-dialog-titlebar-close", $("#newBakDialog").parent()).removeAttr("title"); var setBtnState = function(){ var isValid = $(".invalid-field", "#newBakDialog").length===0; $("#newBakFormBtn").button(isValid ? "enable" : "disable"); }; var attachEvent = function(pathItem){ $(".add", pathItem).button({ icons: { primary: "ui-icon-plusthick" }, text: false }).click(function(){ var pathNode = $.parseHTML($("#pathItem").html()); $(this).parent().after(pathNode); attachEvent($(pathNode)); }); $(".delete", pathItem).button({ icons: { primary: "ui-icon-minusthick" }, text: false }).click(function(){ if(pathItem.parent().children().length===1){ $("input", pathItem).prop("value", null); $("input", pathItem).removeClass("invalid-field"); }else{ pathItem.remove(); } setBtnState(); }); $("input", pathItem).on("keyup", function(){ $(this).toggleClass("invalid-field", !(/(^\/.*)$/.test($(this).val())||$(this).val().trim()==="")); setBtnState(); }); }; var tempNode = $.parseHTML($("#pathItem").html()); $("#includeBox").append(tempNode); attachEvent($(tempNode)); tempNode = $.parseHTML($("#pathItem").html()); $("#excludeBox").append(tempNode); attachEvent($(tempNode)); }, beforeClose: function(){ $("body").css('cursor', 'default'); $(".desc", "#newBakDialog").prop("value", null); $("#includeBox").empty(); $("#excludeBox").empty(); $("body input").prop("readonly", false); $("body button").prop("disabled", false); $("body input").css("cursor", "text"); $("body button").css("cursor", "pointer"); }, buttons : [{ id: "newBakFormBtn", text: "OK", click: function(){ var content = { description: $(".desc", "#newBakDialog").val().trim(), include: [], exclude: [] }; $("input:text","#includeBox").each(function(){ if($(this).val().trim()!=="") content.include.push($(this).val().trim()) }); $("input:text","#excludeBox").each(function(){ if($(this).val().trim()!=="") content.exclude.push($(this).val().trim()) }); if(content.description=="") delete content.description; if(content.include.length==0) delete content.include; if(content.exclude.length==0) delete content.exclude; // Disable Ok button and changing cursor // while processing. $("body").css("cursor", "wait"); $("body input").prop("readonly", "readonly"); $("body button").prop("disabled", "disabled"); $("body input").css("cursor", "wait"); $("body button").css("cursor", "wait"); ginger.createBackupArchive(content, function(){ $("#newBakDialog").dialog("close"); $("#bakGridBody").empty(); ginger.setupBakGrid(); }, function(result) { $("body").css('cursor', 'default'); $("body input").prop("readonly", false); $("body button").prop("disabled", false); $("body input").css("cursor", "text"); $("body button").css("cursor", "pointer"); kimchi.message.error(result.responseJSON.reason); }); } }] }); }; ginger.initBatDelDialog = function() { $("#batDelDialog").dialog({ autoOpen : false, modal : true, width : 600, draggable : false, resizable : false, closeText: "X", open: function(){ $(".ui-dialog-titlebar-close", $("#batDelDialog").parent()).removeAttr("title"); }, beforeClose: function(){ $("input:text", "#batDelDialog").prop("value", null); $("input:text", "#batDelDialog").prop("disabled", true); $("input:text", "#batDelDialog").removeClass("invalid-field"); $("input:text:first", "#batDelDialog").prop("disabled", false); $("input:radio[name=batDelType]:first").prop("checked", true); $("#batDelFormBtn").button("disable"); }, buttons : [{ id: "batDelFormBtn", text: "OK", disabled: true, click: function(){ var content = {counts_ago: -1, days_ago: -1}; var delOption = $("input:radio[name=batDelType]:checked"); var delValue = $("input:text", delOption.parent()).prop("value"); content[delOption.val()] = parseInt(delValue); ginger.deleteBackupArchives(content, function(){ $("#batDelDialog").dialog("close"); $("#bakGridBody").empty(); ginger.setupBakGrid(); }); } }] }); var validateInput = function(input){ var isValid = new RegExp('^[0-9]*$').test(input.val()); input.toggleClass("invalid-field", !isValid); $("#batDelFormBtn").button(isValid && input.val().trim()!=="" ? "enable" : "disable"); }; $("input:radio[name=batDelType]").on("click", function(){ $("input:text", "#batDelDialog").prop("disabled", true); var activeInput = $("input:text", $("input:radio[name=batDelType]:checked").parent()); activeInput.prop("disabled", false); validateInput(activeInput); }); $("input:text", "#batDelDialog").on("keyup", function(){ validateInput($(this)); }); }; ginger.setupBakGrid = function() { ginger.listBackupArchives(function(data){ for(var i=0;i" } data[i][parts[x]] = path; } var tooltipContent = kimchi.substitute($("#backupTooltip").html(), data[i]); tooltipContent = tooltipContent.replace("includePlaceHodler", data[i].include); tooltipContent = tooltipContent.replace("excludePlaceHodler", data[i].exclude); $(".file-col,.time-col", tempNode).tooltip({ items: $(tempNode), content: tooltipContent, tooltipClass: "ginger-dialog", position: { my: "left top-3", at: "left+30 bottom", collision: "flipfit" }, hide: 100 }); $(".download", $(tempNode)).button({ icons: { primary: "ui-icon ui-icon-arrowthickstop-1-s" }, text: false }).click(function(){ var bakItem = $(this).parent(); window.open(kimchi.url + 'plugins/ginger/backup/archives/'+encodeURIComponent(bakItem.prop("id"))+'/file'); }); $(".delete", $(tempNode)).button({ icons: { primary: "ui-icon ui-icon-close" }, text: false }).click(function(){ var bakItem = $(this).parent(); ginger.deleteBackupArchive(bakItem.prop("id"), function(){ bakItem.remove(); }); }); } }); }; ginger.initConfigBak = function() { $("#newDefaultBakBtn").button().click(function(){ginger.createBackupArchive({}, function(){ $("#bakGridBody").empty(); ginger.setupBakGrid(); })}); $("#newCustomBakBtn").button().click(function(){$("#newBakDialog").dialog("open");}); $("#batDelBtn").button().click(function(){$("#batDelDialog").dialog("open");}); ginger.setupBakGrid(); ginger.initBakDialog(); ginger.initBatDelDialog(); }; ginger.initNetworkConfig = function() { var toggleBtnEdit = function(item, on){ $("button", item).toggleClass("hide"); $(".cancel", item).toggleClass("hide", !on); }; var attachBtnEvt = function(node, editFunc, saveFunc, cancelFunc){ $("input", node).each(function(){ $(this).on("keyup", function(){ var isValid = ginger.validateIp($(this).val()); if($(this).parent().hasClass("mask")){ isValid = isValid && ginger.validateMask($(this).val()); } isValid = isValid || $(this).val().trim()==""; $(this).toggleClass("invalid-field", !isValid); $(".save", node).prop("disabled", !isValid); }); }); $(".edit", node).button({ icons: { primary: "ui-icon-pencil" }, text: false }).click(editFunc); $(".save", node).button({ icons: { primary: "ui-icon-disk" }, text: false }).click(saveFunc); $(".cancel", node).button({ icons: { primary: "ui-icon-arrowreturnthick-1-w" }, text: false }).click(cancelFunc); }; ginger.getInterfaces(function(data){ var toggleInterfaceEdit = function(item, on){ $("label", item).toggleClass("hide", on); $("input", item).toggleClass("hide", !on) toggleBtnEdit(item, on); }; for(var i=0;i 0) { $(".ginger .host-admin .sensor-inline").remove(); } $.each(result, function(i1, d1) { if(d1 && d1 != null && i1 != "hdds") { $.each(d1, function(i2, d2) { var pathNode = $.parseHTML(kimchi.substitute($("#sensorBody").html(), { labelHead : i2 })); $(".sensor-panel").append(pathNode); if(d2 && d2 != null) { $.each(d2, function(i3, d3) { if(i3 && d3 != null && i3 != "unit") { $.each(d3, function(i4, d4) { if(i4.match("input")) { var pathNodeU = $.parseHTML(kimchi.substitute($("#sensorUnit").html(), { labelBody : i3, labelNumber : d4, labelUnit : d2["unit"] })); $("#" + i2).append(pathNodeU); } }); } }); } }); } else { if(d1 != null) { var pathNode = $.parseHTML(kimchi.substitute($("#sensorBody").html(), { labelHead : i1 })); $(".sensor-panel").append(pathNode); $.each(d1, function(i5, d5) { if(i5 != "unit") { var pathNodeU = $.parseHTML(kimchi.substitute($("#sensorUnit").html(), { labelBody : i5, labelNumber : d5, labelUnit : d1["unit"] })); $("#" + i1).append(pathNodeU); } }); } } }); setTimeout(ginger.listSensors, 5000); }); }; ginger.initSensorsMonitor = function() { ginger.listSensors(); }; ginger.initSEPConfig = function() { var listSEPContent = function() { ginger.getSEPContent(function(result) { if(result.status === "running") { $("#sepStatusLog").removeClass("down"); $("#sepStatusLog").addClass("up"); } else { $("#sepStatusLog").removeClass("up"); $("#sepStatusLog").addClass("down"); } $("#sepHostName").val(result["subscription"].hostname); $("#sepPort").val(result["subscription"].port); $("#sepSNMPCommunity").val(result["subscription"].community); if(result.status != "running") { $("#sepStart").button().attr("style", "display"); $("#sepStop").button().attr("style", "display:none"); } else { $("#sepStart").button().attr("style","display:none"); $("#sepStop").button().attr("style","display"); } }, function() { kimchi.message.error.code('GINSEP0005E'); }); }; var sepSubscription = function(sepHostName, sepPort, sepCommunity) { var data = { hostname : sepHostName, port : sepPort, community : sepCommunity }; ginger.updateSEPContent(data, function() { listSEPContent(); }, function() { kimchi.message.error.code('GINSEP0006E'); }); }; var sepStart = function() { ginger.startSEP(function() { $("#sepStart").hide(); $("#sepStop").show(); listSEPContent(); }, function(){ kimchi.message.error.code('GINSEP0007E'); }); }; var sepStop = function() { ginger.stopSEP(function() { $("#sepStart").show(); $("#sepStop").hide(); listSEPContent(); }, function(){ kimchi.message.error.code('GINSEP0008E'); }); }; $("#sepSubscribe").button().click(function() { if($("#sepHostName").val() === "") { kimchi.message.error.code("GINSEP0001E"); listSEPContent(); } else if($("#sepPort").val() === "") { kimchi.message.error.code("GINSEP0002E"); listSEPContent(); } else if($("#sepSNMPCommunity").val() === "") { kimchi.message.error.code("GINSEP0003E"); listSEPContent(); } else { sepSubscription($("#sepHostName").val(), $("#sepPort").val(), $("#sepSNMPCommunity").val()); } }); $("#sepStart").button().click(function() { sepStart(); }); $("#sepStop").button().click(function() { sepStop(); }); listSEPContent(); }; ginger.initUserManagement = function() { var listUsers = function() { $(".content-body", ".ginger .host-admin .user-manage").empty(); ginger.getUsers(function(result) { for (var i=0; i[type='radio']:checked", ".user-add-body").val(); var dataSubmit = { name : userName, password : userPasswd, group : userGroup, profile : userProfile }; if (userPasswd === userConfirmPasswd) { ginger.addUser(dataSubmit, function() { $("#hostUserAdd").dialog("close"); listUsers(); }, function() { clearUMSubmit(); }); } else { kimchi.confirm({ title : i18n['KCHAPI6006M'], content : i18n['GINUM0002E'], confirm : i18n['KCHAPI6002M'], cancel : i18n['KCHAPI6003M'] }, function() { clearUMSubmit(); }, function() { clearUMSubmit(); }); } }); $("#user-cancel", $(this)).button().click(function(event) { $("#hostUserAdd").dialog("close"); }); }, beforeClose : function() { clearUMSubmit(); $("#user-submit").unbind("click"); } }); }); listUsers(); }; ginger.initFirmware = function() { ginger.getFirmware(function(data){ $("#gingerFWVer").html(data.level); }); $("#gingerPackPath").on("keyup", function(evt) { var packPath = $("#gingerPackPath").prop("value"); var isValid = /(^\/.*)$/.test(packPath); $("#gingerPackPath").toggleClass("invalid-field", !isValid && packPath!==""); $("#gingerPackPathSub").button(isValid ? "enable" : "disable"); }); $("#gingerPackPathSub").button({disabled: true}).click(function(){ kimchi.confirm({ title : i18n['KCHAPI6006M'], content : "The system will be immediately reset to flash the firmware. It may take longer than normal for it to reboot.", confirm : i18n['KCHAPI6002M'], cancel : i18n['KCHAPI6003M'] }, function() { ginger.updateFirmware({ path: $("#gingerPackPath").prop("value") }, function(){ $("#gingerFWUpdateMess").css("display", "inline-block"); $("#gingerPackPathSub").button("disable"); $("#gingerPackPath").prop("disabled", true); }); }, null); }); }; ginger.initAdmin = function(){ $("#gingerHostAdmin").accordion({ collapsible: true, active: 1 }); $(".content-area", "#gingerHostAdmin").css("height", "100%"); ginger.getCapabilities(function(result) { $.each(result, function(enableItem, capability) { var itemLowCase = enableItem.toLowerCase(); if (capability) { $("." + itemLowCase + "-ppc-enabled").show(); switch(itemLowCase) { case "firmware": ginger.initFirmware(); break; case "backup": ginger.initConfigBak(); break; case "network": ginger.initNetworkConfig(); break; case "powerprofiles": ginger.initPowerMgmt(); break; case "sanadapters": ginger.initSANAdapter(); break; case "sensors": ginger.initSensorsMonitor(); break; case "sep": ginger.initSEPConfig(); break; case "users": ginger.initUserManagement(); break; } } else { $("." + itemLowCase + "-ppc-enabled").hide(); } }); }); }; ginger-1.3.0.1/ui/js/util.js000066400000000000000000000244631247135605500155120ustar00rootroot00000000000000ginger = {}; ginger.getFirmware = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/firmware', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.updateFirmware = function(content, suc, err){ $.ajax({ url : kimchi.url + "plugins/ginger/firmware", type : 'PUT', contentType : 'application/json', dataType : 'json', data : JSON.stringify(content), success: suc, error: err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.listBackupArchives = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/backup/archives', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.createBackupArchive = function(bak, suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/backup/archives', type : 'POST', contentType : 'application/json', dataType : 'json', data : JSON.stringify(bak), success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.getBackupArchiveFile = function(id, suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/backup/archives/' + encodeURIComponent(id) + '/file', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.deleteBackupArchive = function(id, suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/backup/archives/' + encodeURIComponent(id), type : 'DELETE', contentType : 'application/json', dataType : 'json', success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.deleteBackupArchives = function(content, suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/backup/discard_archives', type : 'POST', contentType : 'application/json', dataType : 'json', data : JSON.stringify(content), success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.getInterfaces = function(suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/network/interfaces', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.updateInterface = function(name, content, suc, err){ $.ajax({ url : kimchi.url + 'plugins/ginger/network/interfaces/' + encodeURIComponent(name), type : 'PUT', contentType : 'application/json', dataType : 'json', data : JSON.stringify(content), success: suc, error: err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.getNetworkGlobals = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/network', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.updateNetworkGlobals = function(content, suc, err){ $.ajax({ url : kimchi.url + 'plugins/ginger/network', type : 'PUT', contentType : 'application/json', dataType : 'json', data : JSON.stringify(content), success: suc, error: err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.confirmNetworkUpdate = function(suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/network/confirm_change', type : 'POST', contentType : 'application/json', dataType : 'json', success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.confirmInterfaceUpdate = function(name, suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/network/interfaces/' + encodeURIComponent(name) + '/confirm_change', type : 'POST', contentType : 'application/json', dataType : 'json', success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.validateIp = function(ip){ var ipReg = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; return ipReg.test(ip); }; ginger.validateMask = function(mask){ if(mask.indexOf('.')!=-1){ var secs = mask.split('.'); var binMask = ""; for(var i=0; i 0 && mask < 32; } }; ginger.getPowerProfiles = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/powerprofiles', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.activatePowerProfile = function(name, suc, err){ $.ajax({ url : kimchi.url + "plugins/ginger/powerprofiles/" + encodeURIComponent(name), type : 'PUT', contentType : 'application/json', dataType : 'json', data : JSON.stringify({ active: true }), success: suc, error: err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.getSANAdapters = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/san_adapters', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.getSensors = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/sensors', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.getSEPContent = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/ibm_sep', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.updateSEPContent = function(sep, suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/ibm_sep', type : 'PUT', contentType : 'application/json', dataType : 'json', data : JSON.stringify(sep), resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.startSEP = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/ibm_sep/start', type : 'POST', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.stopSEP = function(suc, err){ kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/ibm_sep/stop', type : 'POST', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : err || function(data) { kimchi.message.error(data.responseJSON.reason); } }); }; ginger.getUsers = function(suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/users', type : 'GET', contentType : 'application/json', dataType : 'json', resend : true, success : suc, error : function(data) { kimchi.message.error(data.responseJSON.reason); } }); } ginger.addUser = function(username, suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/users', type : 'POST', contentType : 'application/json', data : JSON.stringify(username), dataType : 'json', resend : true, success : suc, error : function(data) { kimchi.message.error(data.responseJSON.reason); err(); } }); } ginger.deleteUser = function (username, suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/users/' + username, type : 'DELETE', contentType : 'application/json', dataType : 'json', success : suc, error : function(data) { kimchi.message.error(data.responseJSON.reason); } }); } ginger.getCapabilities = function(suc, err) { kimchi.requestJSON({ url : kimchi.url + 'plugins/ginger/capabilities', type : 'GET', contentType : 'application/json', dataType : 'json', success : suc, error : function(data) { kimchi.message.error(data.responseJSON.reason); } }); }ginger-1.3.0.1/ui/pages/000077500000000000000000000000001247135605500146515ustar00rootroot00000000000000ginger-1.3.0.1/ui/pages/Makefile.am000066400000000000000000000013371247135605500167110ustar00rootroot00000000000000# # Project Ginger # # Copyright IBM, Corp. 2014 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. SUBDIRS = help htmldir = $(datadir)/kimchi/plugins/ginger/ui/pages dist_html_DATA = \ host-admin.html.tmpl \ i18n.json.tmpl \ $(NULL) ginger-1.3.0.1/ui/pages/help/000077500000000000000000000000001247135605500156015ustar00rootroot00000000000000ginger-1.3.0.1/ui/pages/help/Makefile.am000066400000000000000000000021671247135605500176430ustar00rootroot00000000000000# # Ginger # # Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA SUBDIRS = en_US pt_BR zh_CN DITA_HTML_FILES = $(patsubst %.dita,%.html,$(wildcard */*.dita)) HTML_FILES = $(if $(DITA_HTML_FILES), $(DITA_HTML_FILES), $(wildcard */*.html)) DITA_XSL_FILE = dita-help.xsl EXTRA_DIST = $(DITA_XSL_FILE) all: $(HTML_FILES) $(wildcard */*.dita) %.html: %.dita $(DITA_XSL_FILE) xsltproc -o $@ $(DITA_XSL_FILE) $< CLEANFILES = $(HTML_FILES) ginger-1.3.0.1/ui/pages/help/dita-help.xsl000066400000000000000000000017721247135605500202070ustar00rootroot00000000000000 <xsl:value-of select="/cshelp/title" />

ginger-1.3.0.1/ui/pages/help/en_US/000077500000000000000000000000001247135605500166125ustar00rootroot00000000000000ginger-1.3.0.1/ui/pages/help/en_US/Makefile.am000066400000000000000000000016571247135605500206570ustar00rootroot00000000000000# Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA en_US_helpdir = $(datadir)/kimchi/plugins/ginger/ui/pages/help/en_US dist_en_US_help_DATA = $(wildcard *.html) $(NULL) EXTRA_DIST = $(wildcard *.dita) CLEANFILES = $(wildcard *.html) ginger-1.3.0.1/ui/pages/help/en_US/host-admin.dita000066400000000000000000000040331247135605500215200ustar00rootroot00000000000000 Administration The Administration page shows information about your firmware and backup configuration files.

The Firmware Updates section displays the current firmware version. You can update this version by downloading the RPM file from Fix Central, providing the path to the RPM file, and clicking Update.

The Configuration Backup section displays configuration backup files. Hovering over the name displays the paths that are included and excluded. The files are saved as tar files. You can download a file by clicking the down arrow.

Click the following to generate new files or delete them.

Generate Default Backup
Generates a new default backup file. The default paths that are saved are /etc and /var/lib/libvirt.
New Custom Backup
Generates a custom backup file. To specify which paths that you want to save, enter a path that you want included under Path Include or a path that you want excluded under Path Exclude. To add more than one path to either field, click the plus (+). Optionally, you can enter a description for the backup file. Click OK to generate the file.
Batch Delete
Use this option to delete a range of backup files.
ginger-1.3.0.1/ui/pages/help/pt_BR/000077500000000000000000000000001247135605500166075ustar00rootroot00000000000000ginger-1.3.0.1/ui/pages/help/pt_BR/Makefile.am000066400000000000000000000016571247135605500206540ustar00rootroot00000000000000# Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA pt_BR_helpdir = $(datadir)/kimchi/plugins/ginger/ui/pages/help/pt_BR dist_pt_BR_help_DATA = $(wildcard *.html) $(NULL) EXTRA_DIST = $(wildcard *.dita) CLEANFILES = $(wildcard *.html) ginger-1.3.0.1/ui/pages/help/pt_BR/host-admin.dita000066400000000000000000000043701247135605500215210ustar00rootroot00000000000000 Administração A página Administração mostra informações sobre seu firmware e arquivos de configuração de backup.

A seção Atualizações de firmware exibe a versão de firmware atual. É possível atualizar essa versão fazendo o download do arquivo RPM a partir do Fix Central, fornecendo o caminho para o arquivo RPM e clicando em Atualizar.

A seção Backup de configuração exibe arquivos de backup de configuração. Passar o mouse sobre o nome exibe os caminhos incluídos e excluídos. Os arquivos são salvos como arquivos tar. É possível fazer o download de um arquivo clicando na seta para baixo.

Clique nos itens a seguir para gerar novos arquivos ou para excluí-los.

Gerar backup padrão
Gera um novo arquivo de backup padrão. Os caminhos padrão que são salvos são /etc e /var/lib/libvirt.
Novo backup customizado
Gera um arquivo de backup customizado. Para especificar quais caminhos deseja salvar, insira um caminho que deseja incluir em Inclusão de caminho ou um caminho que deseja excluir em Exclusão de caminho. Para incluir mais de um caminho em um dos campos, clique em mais (+). Opcionalmente, é possível inserir uma descrição para o arquivo de backup. Clique em OK para gerar o arquivo.
Exclusão em lote
Use essa opção para excluir um intervalo de arquivos de backup.
ginger-1.3.0.1/ui/pages/help/zh_CN/000077500000000000000000000000001247135605500166025ustar00rootroot00000000000000ginger-1.3.0.1/ui/pages/help/zh_CN/Makefile.am000066400000000000000000000016571247135605500206470ustar00rootroot00000000000000# Copyright IBM Corp, 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA zh_CN_helpdir = $(datadir)/kimchi/plugins/ginger/ui/pages/help/zh_CN dist_zh_CN_help_DATA = $(wildcard *.html) $(NULL) EXTRA_DIST = $(wildcard *.dita) CLEANFILES = $(wildcard *.html) ginger-1.3.0.1/ui/pages/help/zh_CN/host-admin.dita000066400000000000000000000037361247135605500215210ustar00rootroot00000000000000 管理 管理”页面显示有关固件和备份配置的信息。

“固件更新”部分显示当前固件版本。 您可以通过从 Fix Central 下载 RPM 文件,将路径提供给 RPM 文件,然后单击更新来更新此版本。

“配置备份”部分显示配置备份文件。将鼠标悬浮在名称上将显示要包括和要排除的路径。将这些文件保存为 tar 文件。您可以通过单击向下箭头下载文件。

单击以下内容以生成新文件或将它们删除。

生成缺省备份
生成新的缺省备份文件。保存的缺省路径为 /etc/var/lib/libvirt
新建定制备份
生成定制备份文件。要指定您想要保存的路径,请在“包含路径”下输入您想要包含的路径或者在“排除路径”下输入您想要排除的路径。要在以上任意字段中添加多个路径,请单击加号键 (+)。 可选,您可以为备份文件输入描述。单击确定以生成文件。
批量删除
使用此选项可删除一系列备份文件。
ginger-1.3.0.1/ui/pages/host-admin.html.tmpl000066400000000000000000000264361247135605500205700ustar00rootroot00000000000000 #unicode UTF-8 #import gettext #from kimchi.cachebust import href #silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang) #silent _ = t.gettext #silent _t = t.gettext

$_("Firmware Update")

$_("Firmware Version: ")
$_("Package Path: ")
$_("The absolute path to the firmware rpm.")

$_("Configuration Backup")

$_("Batch Delete") $_("New Custom Backup") $_("Generate Default Backup")
$_("File")
$_("Timestamp")

$_("Network Configuration")

$_("Interface")
$_("Name")$_("IP")$_("Mask")
$_("DNS")
$_("Gateway")

$_("Power Options")

$_("Activated Option") $_("Selected Option") $_("Unselected Option") $_("Activate")

$_("SAN Adapters")

$_("Name")
$_("WWPN")
$_("WWNN")
$_("State")
$_("In-Use/Max Ports")
$_("Speed")
$_("Symbolic Name")

$_("Sensor Monitor")

$_("SEP Configuration")

$_("Status:")
$_("Host Name:")
$_("Port:")
$_("SNMP Community:")


$_("Subscribe") $_("Start")

$_("User Management")

$_("Name") $_("Group") $_("Profile")
$_("Description")
$_("Path Included")
$_("Path Excluded")
$_("Preserve the latest") $_("backups")
$_("Preserve the latest") $_("days of backups")
$_("User Name")
$_("Password")
$_("Confirm Password")
$_("Group")
$_("Profile")




ginger-1.3.0.1/ui/pages/i18n.json.tmpl000066400000000000000000000012751247135605500173030ustar00rootroot00000000000000#unicode UTF-8 #import gettext #from kimchi.cachebust import href #silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang) #silent _ = t.gettext #silent _t = t.gettext { "Administration": "$_("Administration")", "GINSEP0001E": "'Host Name' is a required parameter.", "GINSEP0002E": "'Port' is a required parameter.", "GINSEP0003E": "'SNMP Community' is a required parameter.", "GINSEP0005E": "Error loading SEP data from server.", "GINSEP0006E": "Error subscribing SEP data to server.", "GINSEP0007E": "Error starting SEP service.", "GINSEP0008E": "Error stopping SEP service.", "GINUM0002E": "The two passwords entered do not match." }