Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-06-2005, 11:01 AM
|
#1
|
Member
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208
Rep:
|
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.
|
|
|
06-06-2005, 11:15 AM
|
#2
|
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,799
|
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 ?
|
|
|
06-06-2005, 11:15 AM
|
#3
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
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...
|
|
|
06-06-2005, 11:31 AM
|
#4
|
Member
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208
Original Poster
Rep:
|
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.
|
|
|
06-06-2005, 11:58 AM
|
#5
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
zcat is like cat except it gunzips the file before cating it...
it's the same as doing a "gunzip -c"...
|
|
|
All times are GMT -5. The time now is 04:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|