src2pkg zoneminder 1.25.0 zm.conf missing after installation.
Hey guys!
I wanted to create a package of zoneminder 1.25.0 using the folloving directives: Code:
src2pkg -C -VV -e='--with-webdir=/var/www/htdocs previously i had installed 1.24.2 from slackbuilds and after uninstalling it /etc/zm directory wasnt removed so i removed it manually, and now when i want to install newer version with directives i showed above the whole directory /etc/zm/ and zm.conf is not created nor the file is there. Im wondering what im i missing why is that happening? Thanks alot! |
Quote:
However, Im not sure if this is the problem for you. |
First, check the contents of the package tree -probably /tmp/zoneminder-1.25.0-ARCH-1
to see if the dir etc/zm is even being created and if there is a conf file there. If so, then it means you haven't installed the resulting package. If there is no conf file, then you are missing an install option for the conf file (like install_data). Or you may need a ine of manual code in a src2pkg script to install it. Actually, that is the best solution because you should change the name of the conf file so it gets handled intelligently by installpkg. Rerun the original command adding the '-N' option to generate a script: Code:
src2pkg -C -VV -e='--with-webdir=/var/www/htdocs Then, edit it (after fake_install) to add something like this : mkdir -p $PKG_DIR/etc/zm cp $SRC_DIR/zm.conf $PKG_DIR/etc/zm/zm.conf.new so it looks like this: Code:
compile_source # If used, the 'build' function replaces these 3 Run the modified script with original capital-case arguments, plus the '-A' option: src2pkg -C -VV -TXZ -A |
May I just ask why you didn't use the slackbuild?
http://slackbuilds.org/repository/13...em/ZoneMinder/ |
@gnashley thanks bro its fixed!
@dive i did, i wanted to check newest version :) thanks all for the contribution! |
@gnashley one problem occured again! after installation and wanted to start the script to start the service i got msg:
Code:
Starting ZoneMinder: /etc/rc.d/rc.zm: line 49: /usr/bin/zmpkg.pl: No such file or directory |
Hmmm, this build is pretty complex. Have you tried doing as dive suggests by using the SlackBuild -it includes several patches, extra sources and a couple of config files which should give you a working package. It's not that this can't be done with src2pkg, but you'd need to know a bit about how it works, maybe, to get it done. I've downloaded the sources, patches, etc. and will try to get a workign script for you -but I'm having some pretty serious health problems at the moment and so I can't promise anything right now.
|
@gnashley yes, ive tried slackbuilds before, and i got it created, and installed, everything worked, then i upgraded to kernel 2.6.38.7 then i uninstalled, and after trying to create 1.24.2 package from slacbuilds again i got error saying that zm needs video4linux to be installed, although i have kernel headers and everything kernel related installed, so ive tried newer version 1.25.0 with src2pkg, and this is what i succeed so far!
ive checked installation guide from zoneminder slackware 12.2 followed that steps to install created pkg. ive borrowed some code from slackbuilds so far and this is what mine src2pkg script look so far although i didnt add patches(and after installation i tried to execute rc.zm and the error occured which i posted in my previous post): Code:
#!/bin/bash Ill be waiting for bro, be safe, and well, you can reply to me whenever you will have time, no rush, im just wondering should i bump the thread once in a while to remind you or theres no need for that? I would like to get reply about *.pl.in files in scripts subdirectory in $SRC to understand what *.in means exactly and if its ./configure responsible for those files to generate just *.pl in thia case and if its safe just to rename them to *pl would that suffice. Of course you take some rest, i have infinite patience to wait! Thanks and I wish you well! |
Usually, *.in files are templates for a finished file. Some routine -yes usually 'configure' will process them and replace some values with the proper ones -like 'webdir' for instance. So, no, you can't simply rename them and have them work. The README.PERLDEPS from the SlackBuild kit contains a rather lengthy list of prerl module dependencies. It's possible that there is something new in there that needs to be installed.
Uhh, I notice you are using a pretty old version of src2pkg. Perhaps upgrading would be a good idea: http://distro.ibiblio.org/amigolinux...5-noarch-2.tgz I really will try to work on this for you over the weekend. |
@gnashley thanks for the clarification. On the webpage http://www.zoneminder.com/wiki/index.php/Slackware_12.2 are steps what i used to install 1.24.2 slackbuild, and it worked perfectly.
btw whats interesting about new src2pkg that you posted is that it created *pl in scripts subdir compared to the one that i used previously which it didnt, and i modified script to copy those *.pl files from $SRC/scripts to /usr/bin and now i get new error :) Code:
Starting ZoneMinder: Can't locate ZoneMinder.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.12.3/i486-linux-thread-multi /usr/lib/perl5/site_perl/5.12.3 /usr/lib/perl5/vendor_perl/5.12.3/i486-linux-thread-multi /usr/lib/perl5/vendor_perl/5.12.3 /usr/lib/perl5/5.12.3/i486-linux-thread-multi /usr/lib/perl5/5.12.3 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl) at /usr/bin/zmpkg.pl line 37. thanks bro! |
A couple of other pointers: You are using:
install -d -o $DOCOWN -g $DOCGRP when those vars have not been set. Put them above EXTRA_CONFIGS Change all occurences of $PKG/ to $PKG_DIR (even though PKG is supposed to work) All the stripping and man-page handling should be done automatically for you, so those lines are redundant. The same for normal docs, although the lines using '$DOCOWN -g $DOCGRP' are probably needed as they install extra docs which src2pkg would not automatically include. Instead of '$PKG$DOCROOT/' you can use $DOC_DIR (temporary install dir + path to docs + package-specific doc path). Usually for installing extra docs, the code should be placed *after* the normal create_docs. The var EXTRA_DOCS can usually be used to add extra or unusual docs or doc dirs, but in this case the special ownerships/groups would not be used. Code:
#!/bin/bash |
@gnashley sorry for longer delay.
heres what i get when i want to start /etc/rc.d/rc.zm Code:
Starting ZoneMinder: Can't locate ZoneMinder.pm in @INC (@INC contains: /usr/share/perl5 /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5) at /usr/bin/zmpkg.pl line 37. Tommorrow ill modify the script and post you the results. In the meantime can you tell me is there a way for me to modify the script like to copy all files from specific location, i mean so i dont have to specify every individual file, in specific folder(like cp -a)? i modified the script like you suggested and it everything looks good so far. Heres what it looks like now: Code:
#!/bin/bash |
Try this:
Code:
# fake_install # |
@gnashley that fixes the problem, with that single directive everything is in place and daemon starts no need to copy any files from $SRC, that line was also in the slackbuilds but i didnt include it because i relied myself on src2pkg itself, can you please explain the directive what means INSTALLDIRS=vendor ?
Also in what cases i should use similar instructions with make install like this and not to rely just with basics based on src2pkg? i suspect only when complicated builds are in the game? Thanks bro! |
INSTALLDIRS=vendor is perl-specific variable. It seems to be a bit touchy to use -I've had little luck with it as an option to src2pkg, like: -m="make install DESTDIR=$PKG_DIR INSTALLDIRS=vendor" and I'm not yet sure why that doesn't work. Some of my tries have led to installation of perl subdirs in DESTDIR root-level. It may be that it can only be done as 'root', using the src2pkg -REAL or -SAFE install type.
I'm still really sick, but when I get a little better I'll have a look into getting that to work. |
@gnashley i wish you very fast recoverage from illness. you dont have to answer instantly. Just take your time. For me in this specific build i ran the script as root , and rc.zm script was looking some files in @INC as you can see and after i used that line, i didnt have to modify the script that much, and daemon started correctly, and every file belonged where it should have been after installation, so yes it might be the case that it works only when the script is ran as root. I ran as root because in JAIL mode i got some permission denied errors when in root everything went smoothly.
if i understood correctly INSTALLDIRS=vendor means install perl modules in vendor installation dir? Is that correct? |
@matters
did you fix this problem ?? I have the same...and I canīt fix that !! |
/etc/rc.d/rc.zm status
httpd (pid 2735 1818 1809 1808 1769) is running... mysqld (pid 1767) is running... Can't locate ZoneMinder.pm in @INC (@INC contains: /usr/share/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5) at /usr/bin/zmpkg.pl line 38. BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 38. ZoneMinder is stopped Same error. bash-4.2# set | grep perl OLDPWD=/root/perl5/lib PATH=/root/perl5/bin:/root/perl5/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin PERL5LIB=/root/perl5/lib/perl5/x86_64-linux-thread-multi:/root/perl5/lib/perl5 PERL_LOCAL_LIB_ROOT=/root/perl5 PERL_MB_OPT='--install_base /root/perl5' PERL_MM_OPT=INSTALL_BASE=/root/perl5 PWD=/root/perl5/lib/perl5 |
All times are GMT -5. The time now is 05:40 AM. |