Project

General

Profile

Packaging request #906

[kiwix] add package to PCR

pizzaiolo - almost 4 years ago - . Updated 5 months ago.

Status:
open
Priority:
wish
Assignee:
-
% Done:

0%


Description

GPLv3 offline reader, including for Wikipedia.

Arch has it: https://aur.archlinux.org/packages/kiwix-bin/

See also: http://www.kiwix.org/wiki/Software


Files

History

#1

Updated by Anonymous almost 4 years ago

  • Subject changed from Add Kiwix to [kiwix] add package to PCR
#2

Updated by Anonymous almost 4 years ago

  • Subject changed from [kiwix] add package to PCR to [kiwix] add package for PCR
#3

Updated by Anonymous almost 4 years ago

  • Assignee set to Anonymous
#4

Updated by Anonymous almost 4 years ago

  • Status changed from open to in progress
#5

Updated by Anonymous almost 4 years ago

  • % Done changed from 0 to 30
#6

Updated by Anonymous almost 4 years ago

i pushed it to abslibre [0], however it doesn't build yet because gives the following error that should be checked:

zimAccessor.cpp:95:1: error: expected constructor, destructor, or type conversion before 'ZimAccessor'
 ZimAccessor::ZimAccessor()
 ^

[0]:https://projects.parabola.nu/abslibre.git/commit/?id=368915cf94edf4274567e9615116d88dc9c1396e

#7

Updated by pizzaiolo almost 4 years ago

#kiwix log:

(08:04:53) pizzaiolo: Kelson42: the folks at #parabola were trying to package kiwix but they hit some problems upon building it: https://labs.parabola.nu/issues/906#change-6496
(08:06:51) Kelson42: pizzaiolo: hmmm not really a clue
(08:07:01) Kelson42: pizzaiolo: which source code do they use exactly?
(08:07:23) pizzaiolo: 0.9
(08:08:06) pizzaiolo: Kelson42: could you show me the most recent version of kiwix code? I was told by one of the maintainers that the code seemed very old to be compiled
(08:08:25) Kelson42: https://github.com/kiwix/kiwix_mirror
(08:08:50) Kelson42: pizzaiolo: not sure, but this sounds like a side effect of a problem with the xulrunner sd
(08:08:52) Kelson42: sdk
(08:08:58) pizzaiolo: ok
(08:09:19) pizzaiolo: I'll let them know
(08:11:21) Kelson42: pizzaiolo: IMO, the best is to package the statically build kiwix
(08:11:29) Kelson42: pizzaiolo: if possible, that what AUR does

#9

Updated by Anonymous almost 4 years ago

I tried build it from master branch [0] and the same error persists.

[0]:https://projects.parabola.nu/abslibre.git/commit/?id=51ab08cbf695c7db7805465c2fe6a4d05118bdf2

#10

Updated by Anonymous over 3 years ago

  • Status changed from in progress to forwarded upstream
#11

Updated by Anonymous over 3 years ago

  • Subject changed from [kiwix] add package for PCR to [kiwix] add package to PCR
#12

Updated by GNUtoo about 3 years ago

I compiled kiwix some time ago, and the server daemon works.
I only run the server daemon though.

Here's the revision that I used:
e2db6f9 Fixed #2: trying to move to unexisting folder

Denis.

#13

Updated by GNUtoo about 3 years ago

With origin/master and without gecho it builds:

% git log --oneline | head -n1 :(
e2db6f9 Fixed #2: trying to move to unexisting folder
% ./autogen.sh
./configure --disable-components
...
Build details:
ARCH i686
IS_64B no
IS_ARM no
IS_POSIX yes
IS_LINUX yes
IS_OSX no
IS_WIN no
IS_OLD_GECKO no
IS_OLD_ICU no
IS_OLD_GCC no
COMPIL_DEPS no
WITH_COMPONENTS no
STATIC_BINS no
WITH_MANAGER yes
WITH_SERVER yes
WITH_LAUNCHER yes
WITH_INDEXER yes
WITH_INSTALLER yes
WITH_SEARCHER no
WITH_READER no
JAR_CONTENT no
DEBIAN_RULES no
SIGN_BUILD no
CERTIFICATE Developer ID Application: Renaud Gaudin (S3QKTMRU8F)

GECKO_VERSION 41
MAJOR_GECKO_VERSION 41.0
EXACT_GECKO_VERSION 41.0.2

DEP_MIRROR http://download.kiwix.org/dev
DOWNLOADER wget --wait=10 --timeout=600 --retry-connrefused --no-check-certificate -c --no-use-server-timestamps -O
DEP_LIST

EMBED_LIBS /usr/lib/liblzma.so /usr/lib/libzim.so /usr/lib/libpugixml.so /usr/lib/libctpp2.so /usr/lib/libz.so /usr/lib/libxapian.so /usr/lib/libicuuc.so /usr/lib/libicudata.so /usr/lib/libicui18n.so /usr/lib/libmicrohttpd.so

CC gcc
CXX g++
CPP gcc -E
CXXCPP g++ -E
CFLAGS -g -O2
CXXFLAGS -g -O2 -std=gnu++0x -fexceptions -DMOZ_CPP_EXCEPTIONS -DMOZ_NO_MOZALLOC
XPCOM_CFLAGS -fno-rtti -fPIC
CHECK_LDFLAGS -Wl,-z,defs

GECKO_SDK_PATH /usr/lib/xulrunner-devel-41.0.2
XULRUNNER_RUNTIME_PATH /home/gnutoo/Setup/kiwix/src/dependencies/xulrunner
ZLIB_LDFLAGS -lz
XAPIAN_LDFLAGS -lxapian
MICROHTTPD_LDFLAGS -lmicrohttpd
LZMA_LDFLAGS -llzma
LIBZIM_LDFLAGS -lzim
LIBPUGIXML_LDFLAGS -lpugixml
LIBCTPP2_LDFLAGS -lctpp2
ARIA2_FILES /usr/bin/aria2c
ICU_LDFLAGS -L/usr/lib -licui18n -licuuc -licudata
XAPIAN_COMPACT /usr/bin/xapian-compact
UUID_LDFLAGS

ZLIB_STATIC_LDFLAGS
XAPIAN_STATIC_LDFLAGS
MICROHTTPD_STATIC_LDFLAGS
LZMA_STATIC_LDFLAGS
LIBZIM_STATIC_LDFLAGS
LIBPUGIXML_STATIC_LDFLAGS
LIBCTPP2_STATIC_LDFLAGS
UUID_STATIC_LDFLAGS
ICU_STATIC_LDFLAGS

STATIC_LIBM_ARCHIVE
STATIC_LIBRT_ARCHIVE
STATIC_LIBSTDCPP_ARCHIVE
STATIC_LIBDL_ARCHIVE
STATIC_LIBGCC_ARCHIVE
STATIC_LIBPTHREAD_ARCHIVE

HAVE_UPX yes

./configure --disable-components 25.28s user 26.08s system 92% cpu 55.629 total
% make -j3
....
make1: Leaving directory '/home/gnutoo/Setup/kiwix'
make -j3 254.22s user 9.79s system 160% cpu 2:44.44 total

#14

Updated by GNUtoo about 3 years ago

If we have upx installed, it autodetects it with ./configure and fails to install:

% sudo make install
...
upx -9 kiwix-manage
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2013
UPX 3.91        Markus Oberhumer, Laszlo Molnar & John Reiser   Sep 30th 2013

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
upx: kiwix-manage: AlreadyPackedException

Packed 0 files.
make[2]: *** [Makefile:969: all-am] Error 2
make[2]: Leaving directory '/home/gnutoo/Setup/kiwix/src/manager'
make[1]: *** [Makefile:492: install-recursive] Error 1
make[1]: Leaving directory '/home/gnutoo/Setup/kiwix/src'
make: *** [Makefile:555: install-recursive] Error 1

Since we might not want to compress executables with upx, we can instead run configure this way:

% ./configure --disable-components HAVE_UPX=no
...
STATIC_LIBM_ARCHIVE        
STATIC_LIBRT_ARCHIVE        
STATIC_LIBSTDCPP_ARCHIVE    
STATIC_LIBDL_ARCHIVE        
STATIC_LIBGCC_ARCHIVE        
STATIC_LIBPTHREAD_ARCHIVE    

HAVE_UPX            ./configure: line 17297: [: no: integer expression expected
no

./configure --disable-components HAVE_UPX=no  25.62s user 26.06s system 91% cpu 56.392 total

The "./configure: line 17297: [: no: integer expression expected" seem to be a warning and ./configure seem
to succeed nevertheless. Running "echo $?" right after ./configure shows that it didn't produce an error:

% echo $?                                     
0

We can then compile and install as usual:
% make -j3
...
% sudo make install
...
make[3]: Leaving directory '/home/gnutoo/Setup/kiwix'
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/gnutoo/Setup/kiwix'
make[1]: Leaving directory '/home/gnutoo/Setup/kiwix'

#15

Updated by GNUtoo about 3 years ago

Here is an example of a systemd unit for kiwix.
The xim file was installed in

/srv/kiwix/wikipedia_en_all/data/library/wikipedia_en_all_2016-02.zim.xml
.
And here is the config file:
% cat /etc/conf.d/kiwix.conf                              :(
# XML
wikibooks_en_xml="wikibooks_en_all_2016-06.zim.xml" 
wikipedia_en_xml="wikipedia_en_all_2016-02.zim.xml" 

# ports
wikibooks_en_port="8044" 
wikipedia_en_port="8045" 

% cat /etc/systemd/system/kiwix@wikipedia_en.service 
[Unit]
Description=Kiwix (%I)
After=display-manager.service

[Service]
EnvironmentFile=/etc/conf.d/kiwix.conf
User=kiwix
ExecStart=/usr/local/bin/kiwix-serve --port ${wikipedia_en_port} --interface=lo --library ../../../../../srv/kiwix/wikipedia_en_all/data/library/${wikipedia_en_xml}
Restart=always
RestartSec=10

[Install]
WantedBy=default.target
#16

Updated by GNUtoo about 3 years ago

If that can help, I also just published the script I use to generate a web page with the kiwix services.
It uses the configs mentioned above.

git://gnutoo.privatedns.org/kiwix-web-index.git 

#17

Updated by Anonymous almost 3 years ago

  • Assignee deleted (Anonymous)
  • % Done changed from 60 to 0
  • Status changed from forwarded upstream to open

GNUtoo wrote:

If that can help, I also just published the script I use to generate a web page with the kiwix services.
It uses the configs mentioned above.
[...]

I couldn't build it because the issues related to zimAccessor persists. Would you like check our PKGBUILDs (kiwix and kiwix-git) and get a way to solve them? If you have interest, please let me know :)

#18

Updated by ToffeeYogurtPots almost 2 years ago

Not sure what happened to this request. +1 for Kiwix being added.

Since Parabola is a rolling distro this issue (and the workaround in the comments) is probobly relevant: https://github.com/kiwix/kiwix-xulrunner/issues/477

#19

Updated by GNUtoo 5 months ago

I added kiwix-tools in the repository.
Installing it enables you to get kiwix-serve, but not yet the desktop client.

Also available in: Atom PDF