LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-06-2005, 11:01 AM   #1
0.o
Member
 
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208

Rep: Reputation: 35
vsftpd build script


Hola mi amigos,

I am trying to create a Slackware package from vsftpd 2.0.3 source and would like a little help on modifying the build script in the current tree of Slackware. I have been using Slackware for a while now, but have just recently started to learn scripting and how to correctly use build scripts to create my own packages.


The current build script for vsftpd 2.0.1:

Code:
#!/bin/sh
CWD=`pwd`
TMP=${TMP:-/tmp}
PKG=$TMP/package-vsftpd

VERSION=2.0.1
ARCH=${ARCH:-i486}
BUILD=1

if [ ! -d $TMP ]; then
  mkdir -p $TMP
fi
rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf vsftpd-$VERSION
tar xzvf $CWD/vsftpd-$VERSION.tar.gz
cd vsftpd-$VERSION
find . -perm 777 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
chown -R root.root .
zcat $CWD/vsftpd.builddefs.diff.gz | patch -p1 --verbose
zcat $CWD/vsftpd.conf.diff.gz | patch -p1 --verbose
make -j3
mkdir -p $PKG/usr/sbin
cp vsftpd $PKG/usr/sbin
chmod 755 $PKG/usr/sbin/vsftpd
chown -R root:bin $PKG/usr/sbin
strip --strip-unneeded $PKG/usr/sbin/vsftpd
mkdir -p $PKG/usr/man/man{5,8}
cat vsftpd.conf.5 | gzip -9c > $PKG/usr/man/man5/vsftpd.conf.5.gz
cat vsftpd.8 | gzip -9c > $PKG/usr/man/man8/vsftpd.8.gz
mkdir -p $PKG/etc
cat vsftpd.conf > $PKG/etc/vsftpd.conf.new
mkdir -p $PKG/etc/logrotate.d
zcat $CWD/vsftpd.log.gz > $PKG/etc/logrotate.d/vsftpd.new
mkdir -p $PKG/usr/share/empty
mkdir -p $PKG/home/ftp
mkdir -p $PKG/usr/doc/vsftpd-$VERSION
cp -a \
  AUDIT BENCHMARKS BUGS COPYING COPYRIGHT Changelog EXAMPLE FAQ \
  INSTALL LICENSE README* REFS REWARD SECURITY SIZE SPEED TODO TUNING \
  $PKG/usr/doc/vsftpd-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh

cd $PKG
makepkg -l y -c n $TMP/vsftpd-$VERSION-$ARCH-$BUILD.tgz

Do I only need to change the version/build, or what? And maybe a good explanation of what is going on in that code.

Last edited by 0.o; 06-06-2005 at 11:03 AM.
 
Old 06-06-2005, 11:15 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You need the vsftpd.builddefs.diff.gz, vsftpd.conf.diff.gz, slack-desc
and doinst.sh.gz files, then change the version number and all should
go well.

For the explanation, as the script does a bunch of stuff,
could you ask for a particular part ?
 
Old 06-06-2005, 11:15 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
first thing you'd wanna do is just replace the source tarball in the directory and then change the "VERSION=2.0.1" to "VERSION=2.0.3"... then run it like that and take note of any errors you get... i see there's a couple patches in the build directory so you'd probably have to make a couple adjustments, although that's not always the case... if the new version is just a bugfix release you might be just fine, but i haven't looked at the vsftpd changelog and also i haven't looked at those slackware patches so i'm not sure...
 
Old 06-06-2005, 11:31 AM   #4
0.o
Member
 
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208

Original Poster
Rep: Reputation: 35
It seems as though the patches are nothing more than a way to enable different features of vsftpd. The links to the files are:

http://slackware.mirrors.pair.com/sl...lddefs.diff.gz

http://slackware.mirrors.pair.com/sl...d.conf.diff.gz

So i should be able to download them and modify it to my specifications and all will be well.


The part of the script i wasn't sure of was:

Code:
zcat $CWD/vsftpd.builddefs.diff.gz | patch -p1 --verbose
zcat $CWD/vsftpd.conf.diff.gz | patch -p1 --verbose
Although, i have looked up what the program is, i still don't understand why i shouldn't just use patch command to complete this task.
 
Old 06-06-2005, 11:58 AM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
zcat is like cat except it gunzips the file before cating it...

it's the same as doing a "gunzip -c"...

 
  


Reply



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
vsftpd.conf/chroot/vsftpd.chroot_list issue Jerman Linux - Security 2 06-01-2007 07:24 PM
question about the XFCE build script win32sux Slackware 13 11-28-2005 03:58 PM
Script to build Virtualusers lapthorn Linux - Software 0 10-19-2004 05:39 AM
Build Passwd for personal access script, I want to solution. somphob Linux - General 2 08-01-2004 04:25 PM
ColdFusion - Using a script to build and execute SQL query when a button is clicked Locura Programming 1 02-25-2004 09:59 PM

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

All times are GMT -5. The time now is 02:16 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