You are not logged in.
Pages: 1
Topic closed
Alright, I'm making a PKGBUILD for Bastille and so far it looks like this:
pkgname=bastille
pkgver=3.0.9
pkrel=1
url="http://www.bastille-linux.org"
pkgdesc="An interactive tool for hardening Linux systems"
depends=('bash' 'tk')
source=(http://dl.sourceforge.net/sourceforge/Bastille/Bastille-$pkgver.tar.bz)
md5sums=('39794400983d7198b5027659264fa8f3')
build() {
cd $startdir/src/Bastille
./Install.sh || return 1
}
But obviously that wouldn't work, since Bastille's install script shoves everything straight into the system. Here's the install script from the Bastille package:
#!/bin/sh
umask 077
RPM_BUILD_ROOT=""
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/Curses
mkdir -p $RPM_BUILD_ROOT/usr/lib/Bastille
mkdir -p $RPM_BUILD_ROOT/usr/share/Bastille
mkdir -p $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
mkdir -p $RPM_BUILD_ROOT/usr/share/Bastille/Questions
mkdir -p $RPM_BUILD_ROOT/usr/share/Bastille/FKL/configs/
mkdir -p $RPM_BUILD_ROOT/var/lock/subsys/bastille
cp AutomatedBastille $RPM_BUILD_ROOT/usr/sbin/
cp BastilleBackEnd $RPM_BUILD_ROOT/usr/sbin
cp Bastille_Curses.pm $RPM_BUILD_ROOT/usr/lib/perl5/site_perl
cp Bastille_Tk.pm $RPM_BUILD_ROOT/usr/lib/perl5/site_perl
cp Curses/Widgets.pm $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/Curses
cp InteractiveBastille $RPM_BUILD_ROOT/usr/sbin
# Questions.txt has been replaced by Modules.txt and Questions/
#cp Questions.txt $RPM_BUILD_ROOT/usr/share/Bastille
cp Modules.txt $RPM_BUILD_ROOT/usr/share/Bastille
# New Weights file(s).
cp Weights.txt $RPM_BUILD_ROOT/usr/share/Bastille
# Castle graphic
cp bastille.jpg $RPM_BUILD_ROOT/usr/share/Bastille/
# Javascript file
cp wz_tooltip.js $RPM_BUILD_ROOT/usr/share/Bastille/
cp Credits $RPM_BUILD_ROOT/usr/share/Bastille
cp FKL/configs/fkl_config_redhat.cfg $RPM_BUILD_ROOT/usr/share/Bastille/FKL/configs/
cp RevertBastille $RPM_BUILD_ROOT/usr/sbin
ln -s $RPM_BUILD_ROOT/usr/sbin/RevertBastille $RPM_BUILD_ROOT/usr/sbin/UndoBastille
cp bin/bastille $RPM_BUILD_ROOT/usr/sbin
chmod +x $RPM_BUILD_ROOT/usr/sbin/RevertBastille
cp bastille-firewall $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-firewall-reset $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-firewall-schedule $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-tmpdir-defense.sh $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-tmpdir.csh $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-tmpdir.sh $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-firewall.cfg $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-ipchains $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-netfilter $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-firewall-early.sh $RPM_BUILD_ROOT/usr/share/Bastille
cp bastille-firewall-pre-audit.sh $RPM_BUILD_ROOT/usr/share/Bastille
cp complete.xbm $RPM_BUILD_ROOT/usr/share/Bastille
cp incomplete.xbm $RPM_BUILD_ROOT/usr/share/Bastille
cp ifup-local $RPM_BUILD_ROOT/usr/share/Bastille
cp hosts.allow $RPM_BUILD_ROOT/usr/share/Bastille
cp Bastille/AccountSecurity.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/Apache.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/API.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/BootSecurity.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/ConfigureMiscPAM.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/DisableUserTools.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/DNS.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/FilePermissions.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/FTP.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/Firewall.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/HP_API.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/OSX_API.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/LogAPI.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/HP_UX.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/IOLoader.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/Patches.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/Logging.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/MiscellaneousDaemons.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/PatchDownload.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/Printing.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/PSAD.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/RemoteAccess.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/SecureInetd.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/Sendmail.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/TMPDIR.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_AccountSecurity.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_Apache.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_DNS.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_FTP.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_HP_UX.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_MiscellaneousDaemons.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_SecureInetd.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_Sendmail.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_BootSecurity.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_DisableUserTools.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_FilePermissions.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_Logging.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/test_Printing.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/TestAPI.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp Bastille/IPFilter.pm $RPM_BUILD_ROOT/usr/lib/Bastille
cp OSMap/LINUX.bastille $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
cp OSMap/LINUX.system $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
cp OSMap/HP-UX.bastille $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
cp OSMap/HP-UX.system $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
cp OSMap/HP-UX.service $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
cp OSMap/OSX.bastille $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
cp OSMap/OSX.system $RPM_BUILD_ROOT/usr/share/Bastille/OSMap
for file in `cat Modules.txt` ; do
cp Questions/$file.txt $RPM_BUILD_ROOT/usr/share/Bastille/Questions
done
So, my question is... How would I use sed to change the value for RPM_BUILD_ROOT to whatever $startdir/pkg happened to be?
Offline
sed -i -e "s:$RPM_BUILD_ROOT:$startdir/pkg:g" Install.sh
or you could try passing the variable
$RPM_BULD_ROOT=$startdi4r/pkg ./Install.sh
Offline
Thanks... Don't know why I didn't think of that. :oops:
Edit: alright that doesn't work, I'll just use sed the way you told me...
Offline
Thanks... Don't know why I didn't think of that. :oops:
Edit: alright that doesn't work, I'll just use sed the way you told me...
Probably because here's a couple of typos in the line. It should be:
RPM_BUILD_ROOT=$startdir/pkg ./Install.sh
Offline
Doesn't work with sed either, the RPM_BUILD_ROOT line is unchanged.
Offline
this should work:
sed -i "s|""|"$startdir/pkg"|" Install.sh
Offline
sed -i -e "s:$RPM_BUILD_ROOT:$startdir/pkg:g" Install.sh
or you could try passing the variable
$RPM_BULD_ROOT=$startdi4r/pkg ./Install.sh
The above sed command is useless, $ is parsed as the end of line so it should be escaped, the install is easy there's many possibilities here's some using just sed
sed -e "s@(RPM_BUILD_ROOT=).*@1${startdir}/pkg@g" -i install.sh
sed -e "s@$RPM_BUILD_ROOT@${startdir}/pkg@g" -i install.sh
[My Blog] | [My Repo] | [My AUR Packages]
Offline
Alright thanks guys... I'll see how those work.
(FWIW, Snowman, I had noticed and corrected for the typos. )
Offline
Alright thanks guys... I'll see how those work.
(FWIW, Snowman, I had noticed and corrected for the typos. )
8)
Offline
A few more comments on your PKGBUILD, as it's there:
- it's pkgrel, not pkrel
- there's a lot of perl there, so I think you should add perl to depends
- the source path and extension are incorrect. Try this instead: http://dl.sourceforge.net/sourceforge/b … er.tar.bz2
I was going to add yet another sed command as well, but I think you've enough to work with at the moment.
Offline
A few more comments on your PKGBUILD, as it's there:
- it's pkgrel, not pkrel
Thanks, corrected.
- there's a lot of perl there, so I think you should add perl to depends
Done, it needs perl-tk and perl-curses and those are now dependencies. Don't know why I hadn't noticed the Perl earlier... :?
- the source path and extension are incorrect. Try this instead: http://dl.sourceforge.net/sourceforge/b … er.tar.bz2
That's what I tried at first, but either the servers are damn slow or the package doesn't exist - you can't download it directly from Sourceforge, thus the Heanet mirror.
I was going to add yet another sed command as well, but I think you've enough to work with at the moment.
Offline
Ah crap, my bad... Forgot about this some time when I was trying to get the USB install working. Shouldn't take too long though.
Offline
Here, how's this?
pkgname=bastille
pkgver=3.0.9
pkgrel=1
url="http://bastille-linux.org"
pkgdesc="An interactive tool for hardening Linux systems"
depends=('perl-curses' 'perl-tk')
source=(http://heanet.dl.sourceforge.net/sourceforge/bastille-linux/Bastille-$pkgver.tar.bz2)
md5sums=('39794400983d7198b5027659264fa8f3')
build() {
cd $startdir/src/Bastille
sed -e "s@$RPM_BUILD_ROOT@${startdir}/pkg@g" -i Install.sh
./Install.sh || return 1
}
Offline
Here, how's this?
pkgname=bastille pkgver=3.0.9 pkgrel=1 url="http://bastille-linux.org" pkgdesc="An interactive tool for hardening Linux systems" depends=('perl-curses' 'perl-tk') source=(http://heanet.dl.sourceforge.net/sourceforge/bastille-linux/Bastille-$pkgver.tar.bz2) md5sums=('39794400983d7198b5027659264fa8f3') build() { cd $startdir/src/Bastille sed -e "s@$RPM_BUILD_ROOT@${startdir}/pkg@g" -i Install.sh ./Install.sh || return 1 }
does this work?
was just about to post an aur request for this but saw this topic instead
(also the current aur request contains no info hence i was going to post my own)
Offline
This thread is close to four years old - please start a new thread, linking to this one if necessary.
Also, there hasn't been a bastille release since 3.2.1 in September 2008. You may be already aware of this, but I think it's worth mentioning anyway.
Closed.
Offline
Pages: 1
Topic closed