LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-15-2010, 07:56 AM   #1
IRON.klg
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
Src2pkg installing privoxy


In INSTALL I can see:
Quote:
to build from either unpacked tarball or CVS source:

autoheader
autoconf
./configure # (--help to see options)
make # (the make from GNU, sometimes called gmake)
su # Possibly required
make -n install # (to see where all the files will go)
make -s install # (to really install, -s to silence output)
Code:
root@ironnet:/tmp# src2pkg -C -I privoxy-3.0.16-stable-src.tar.gz
Found source archive: privoxy-3.0.16-stable-src.tar.gz
Creating working directories:
   PKG_DIR=/tmp/privoxy-3.0.16-i486-1
   SRC_DIR=/tmp/privoxy-3.0.16-src-1
Unpacking source archive - Done
Correcting source permissions - Done
Checking for patches - None found
Notice - These sources use GNUmakefiles, instead of Makefiles.
We rename the Makefile to Makefile.found and start fresh.
If not, the Makefile would be used instead of the new GNUmakefile.
Found incomplete autoconf sources - Regenerating config files -
Skipping configure_source -
Skipping compile_source -
FAILED!! No INSTALL_LINE given.
I think that trouble is in autoheader. I don't now does src2pkg (2.1) support it.
Is it impossible to build a package of privoxy with src2pkg?
 
Old 04-15-2010, 11:04 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
There is a slackpackage at
http://slackbuilds.org/result/?search=privoxy&sv=13.0
 
Old 04-15-2010, 11:06 AM   #3
IRON.klg
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Also trouble with libsigc++ (http://ftp.gnome.org/pub/GNOME/sourc...-2.2.5.tar.bz2)
Quote:
install/doinst.sh
install/slack-desc
expr: syntax error
expr: syntax error
Executing install script for libsigc++-2.2.5-i486-1...
 
Old 04-15-2010, 12:48 PM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Here' a src2pkg build script for privoxy:

privoxy.src2pkg:
Code:
#!/bin/bash
## src2pkg script for: 	privoxy
## Auto-generated by src2pkg-2.2
## src2pkg - Copyright 2005-2009 Gilbert Ashley <amigo@ibilio.org>

SOURCE_NAME='privoxy-3.0.16-stable-src.tar.gz'
NAME='privoxy'   # Use ALT_NAME to override guessed value
VERSION='3.0.16'   # Use ALT_VERSION to override guessed value
# ARCH=''
# BUILD='1'
# PRE_FIX='usr'

# from the privoxy.SlackBuild:
PRIVOXY_USER=${PRIVOXY_USER:-privoxy}
PRIVOXY_GROUP=${PRIVOXY_GROUP:-privoxy}
if ! grep -q ^$PRIVOXY_GROUP: /etc/group 2>/dev/null ; then
        echo "    Error: PRIVOXY group ($PRIVOXY_GROUP) doesn't exist."
        echo "    Try creating one with: groupadd -g 206 $PRIVOXY_GROUP"
        exit 1
fi
if ! grep -q ^$PRIVOXY_USER: /etc/passwd 2>/dev/null ; then
        echo "    Error: PRIVOXY user ($PRIVOXY_USER) doesn't exist."
        echo "    Try creating one with: useradd -u 206 -g $PRIVOXY_GROUP -d /dev/null -s /bin/false $PRIVOXY_USER"
        exit 1
fi

# Any extra options go here:
EXTRA_CONFIGS="--sysconfdir=/etc/$NAME \
	--localstatedir=/var \
	--docdir=$docdir/$NAME-$VERSION \
	--with-docbook=no \
	--with-user=$PRIVOXY_USER \
	--with-group=$PRIVOXY_GROUP"

# Optional function replaces configure_source, compile_source, fake_install
# To use, uncomment and write/paste CODE between the {} brackets.
# build() { CODE }

# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;

# Execute the named packaging steps:
pre_process
find_source
make_dirs
unpack_source
fix_source_perms

#cd $SRC_DIR
#autoheader
#autoconf

configure_source #
compile_source   # If used, the 'build' function replaces these 3
fake_install     #

mkdir -p $PKG_DIR/etc/$NAME/templates
cp $SRC_DIR/templates/* $PKG_DIR/etc/$NAME/templates

#Adapted from the privoxy.SlackBuild:
rm -rf $PKG_DIR/etc/rc.d
mkdir -p $PKG_DIR/etc/rc.d
cat $SRC_DIR/slackware/rc.privoxy.orig > $PKG/etc/rc.d/rc.$NAME.new
sed -i "	s/%PROGRAM%/$NAME/
		s,%SBIN_DEST%,/usr/bin,
		s,%CONF_DEST%,/etc/$NAME,
		s/%USER%/$NAME/
		s/%GROUP%/$NAME/
	" $PKG_DIR/etc/rc.d/rc.$NAME.new 

# Fix Path within the configuration files (thanks to h4kteur)
sed -i "s#$PKG_DIR##g" $PKG_DIR/etc/$NAME/config
# Fix Path with the config file to point to right usermanual (thanks to BP{k})
sed -i \
  "s#user-manual /usr/doc/$NAME#user-manual /$docdir/$NAME-$VERSION#" \
    $PKG_DIR/etc/privoxy/config

# Make .new files so we dont clobber existing configuration
find $PKG_DIR/etc/privoxy -type f -exec mv {} {}.new \;
# Don't clobber the logfile either
mv $PKG_DIR/var/log/privoxy/logfile $PKG_DIR/var/log/privoxy/logfile.new
 
# Remove this directory since it's empty and part of Slackware base 
rmdir $PKG_DIR/var/run &> /dev/null

fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process
Also place this alongside the build script as:

doinst.prepend:
Code:
# Keep same perms on rc.privoxy.new:
if [ -e etc/rc.d/rc.privoxy ]; then
  cp -a etc/rc.d/rc.privoxy etc/rc.d/rc.privoxy.new.incoming
  cat etc/rc.d/rc.privoxy.new > etc/rc.d/rc.privoxy.new.incoming
  mv etc/rc.d/rc.privoxy.new.incoming etc/rc.d/rc.privoxy.new
fi

# If there's no existing log file, move this one over; 
# otherwise, kill the new one
if [ ! -e var/log/privoxy/logfile ]; then
  mv var/log/privoxy/logfile.new var/log/privoxy/logfile
else
  rm -f var/log/privoxy/logfile.new
fi

if ! grep -q ^privoxy: /etc/group 2>/dev/null ; then
        echo "    Error: PRIVOXY group 'privoxy' doesn't exist."
        echo "    Creating one with: groupadd -g 206 privoxy"
        groupadd -g 206 @PRIVOXY_GROU@
fi

if ! grep -q ^privoxy: /etc/passwd 2>/dev/null ; then
        echo "    Error: PRIVOXY user 'privoxy' doesn't exist."
        echo "    Try creating one with: useradd -u 206 -g privoxy -d /dev/null -s /bin/false privoxy"
        exit 1
fi

if ! [ -x etc/rc.d/rc.privoxy ]; then
	echo "    etc/rc.d/rc.privoxy must be set executable to enable privoxy at boot-time:"
	echo "    chmod 755 /etc/rc.d/rc.privoxy"
fi
Did you create the libsigc++ package using src2pkg, or how?

Last edited by gnashley; 04-15-2010 at 02:22 PM.
 
1 members found this post helpful.
Old 04-15-2010, 01:30 PM   #5
IRON.klg
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Yes, I tried to create it with parameters -C -I.
10x for script, I'll try to use it.
But if I'll get the same trouble in future, should I ask you for another script? Are you going to update you program to version 2.2?
 
Old 04-15-2010, 02:25 PM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I updated the build script to make it more complete and adding a doinst.sh fragment (be súre to name it doinst.prepend)

I'm usually around to help out when you get stuck building something using src2pkg, so don't be afraid to ask for help.
It's worth studying any scripts I provide you with, as well as the included examples, so you can go along learning to fix troublesome builds.

src2pkg-2.2 is due out any day now.
 
Old 04-17-2010, 08:01 AM   #7
IRON.klg
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Original Poster
Rep: Reputation: 0
I think it isn't good...
Code:
root@ironnet:/tmp/php# src2pkg -C -I -e='--sysconfdir=/etc --enable-fastcgi' php-5.3.2.tar.bz2
Found source archive: php-5.3.2.tar.bz2
Deleting old build files - Done
Creating working directories:
   PKG_DIR=/tmp/php-5.3.2-i486-1
   SRC_DIR=/tmp/php-5.3.2-src-1
Unpacking source archive - Done
Correcting source permissions - Done
Checking for patches - None found
Found configure script - Done
Configuring sources using:
 LDFLAGS="-Wl,-L/lib,-L/usr/lib" CFLAGS="-O2 -m32 -march=i486 -mtune=i686" ./configure --prefix=/usr --sysconfdir=/etc --enable-fastcgi --libdir=/usr/lib
Configuration has been - Successful!
Compiling sources - Using: 'make'
Compiling has been - Successful!
Checking for Makefile rule: 'install' Okay
Creating content in JAIL root - Using: 'make install'
Safe content creation - Successful!
Processing package content:
Correcting package permissions - Done
Stripping ELF binaries - Using: strip -p --strip-unneeded Done
Checking for standard documents - Done
Compressing man pages - Done
Creating slack-desc - From default text
Searching for links in: php-5.3.2-i486-1 - Done
Adding links to doinst.sh - Adding links-creation to the doinst.sh
Deleting symbolic links - Removing links from the package directory
Rechecking package correctness - 
NOTICE!  Empty files were found in the package tree. These may
or may not be needed by the program. By default, src2pkg allows
empty files under /etc or /var but removes any others. Use the
option ALLOW_EMPTY_FILES=YES to allow all zero-length files.
List of removed files:
usr/lib/php/test/Structures_Graph/tests/README
usr/lib/php/.lock
usr/lib/php/.depdblock
Checking for misplaced dirs - Done
   Notice - Package contains hidden items:
     usr/lib/php/.filemap
     usr/lib/php/.registry
     usr/lib/php/.registry/.channel.doc.php.net
     usr/lib/php/.registry/.channel.__uri
     usr/lib/php/.registry/.channel.pecl.php.net
     usr/lib/php/.channels
     usr/lib/php/.channels/.alias
     usr/lib/php/.depdb
    Check and correct if necessary.
Rechecking package permissions - Done
Creating package: php-5.3.2-i486-1.tgz - Done
Package Creation - Successful! Package Location:
/tmp/php/php-5.3.2-i486-1.tgz
Installing package php-5.3.2-i486-1.tgz
.....
install/
install/doinst.sh
install/slack-desc
expr: syntax error
expr: syntax error
Executing install script for php-5.3.2-i486-1...

but:
root@ironnet:/tmp/php# installpkg php-5.3.2-i486-1.tgz
Verifying package php-5.3.2-i486-1.tgz.
Installing package php-5.3.2-i486-1.tgz:
PACKAGE DESCRIPTION:
# php
#
# No description was given for this package.
#
# Packaged by src2pkg
Executing install script for php-5.3.2-i486-1.tgz.
Package php-5.3.2-i486-1.tgz installed.

Last edited by IRON.klg; 04-17-2010 at 08:03 AM.
 
Old 04-17-2010, 10:16 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Thanks for reporting that. I'm pretty sure I've found the problem already. A while back I re-wrote some code which preceeds the routine where that error comes from and changed a couple of things which seem to have broken it. Not many people use the '-I' option, so the error didn't show up until you came along...

I'm releasing in a few days so I'll get this fix in there before then. If you want your name in the src2pkg ChangeLog, email me with your real name at:
amigo AT ibiblio DOT org
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANNOUNCE] src2pkg-2.0 and src2pkg-ng-0.0.1 gnashley Slackware 11 12-21-2009 11:41 AM
New src2pkg release available for download -Introducing the src2pkg WIKI gnashley Slackware 11 05-06-2008 11:09 AM
After Installing Scribus using Src2pkg to compile getting 'Inconsistency detected.... NightSky Slackware 13 02-22-2008 02:18 AM
Privoxy - "Privoxy is not being used" from http://www.privoxy.org/config/ slimjim Linux - Networking 1 03-12-2007 11:07 AM
Error installing Privoxy on Suse 10.2 exit status 6? eric11210 Linux - Software 2 01-07-2007 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration