You are not logged in.
I'm making a pkgbuild for an application, and it's not working. Specifically frustrating points:
1. The man pages are being copied to the correct location in the pkg directory.
Not specifically frustrating in itself, but
2. The 'cp' command is not copying files as it does when I manually execute the command.
Examples:
cd $startdir/src/nod32lfs.i386.oth
cp -R ./nod32lfs-2.05/* $startdir/pkg/
this copies EVERYTHING except the share folder. It also automagically copies the usr/share/man directory to $startdir/pkg/usr/man without my consent.
cd ./usr/share
cp -R ./* $startdir/usr/share
This copies nothing at all. When I manually issue the above commands, they work fine. This leads me to believe that at least one version of makepkg hates me.
Does anyone have any ideas? Meanwhile, I'm going to manually frankenstein together a package.
fffft!
Offline
hmmm can you point me to the source, I can take a look at it (trying it under MSys on windows helps diagnose errors sometimes)
Offline
hmmm can you point me to the source, I can take a look at it (trying it under MSys on windows helps diagnose errors sometimes)
It's not even source code. It's pre-compiled packages, and I would have linked to it, but it's commercial software. It's pretty damn simple software though, I think it's dependent upon bash, and maybe fam for on-access protection.
EDIT: Oh, the PKGBUILD source? I've actually got to go right now, but I'll post it in a bit. Thanks
fffft!
Offline
Ah, ok... I was going to look at the tarball and try and monkey with it...
just noticed:
cp -R ./* $startdir/usr/share
should probably be $startdir/pkg/usr/share - I dunno if that's a typo or not...
Offline
Ah, ok... I was going to look at the tarball and try and monkey with it...
just noticed:cp -R ./* $startdir/usr/share
should probably be $startdir/pkg/usr/share - I dunno if that's a typo or not...
It was a typo, here's the current PKGBUILD I'm working with. The final three lines of the build function were inserted by:
1. executing them one by one in the terminal
2. returning in the command history, and editing each command by prefixing "echo " and suffixing " >> PKGBUILD".
3. Moving them around in the text editor so they are inside the build function.
They are the last commands issued. Yet, no share folder. When I try inserting anywhere in the PKGBUILD:
mkdir -p $startdir/usr/share
It returns an error saying that the directory already exists
pkgname=nod32lfs
pkgver=2.05
pkgrel=1
pkgdesc="NOD32 antivirus software for Linux file server"
url="http://www.eset.com"
license=""
depends=()
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=($pkgname-$pkgver-1.i386.oth.tgz)
md5sums=(d8e4ac6892e449485d1d93d8a0416a95)
build() {
cd $startdir/src/$pkgname-$pkgver.i386.oth
tar xvzf nod32lfs-2.05-1.i386.tgz
tar xvzf nod32lup-2.07-1.i386.tgz
cp -R ./nod32lfs-2.05/* $startdir/pkg
cp -R ./nod32lup-2.07/* $startdir/pkg
mkdir $startdir/pkg/etc/rc.d
mv $startdir/pkg/etc/init.d/nod32fac.generic $startdir/pkg/etc/rc.d/nod32
rm -R $startdir/pkg/etc/init.d
rm $startdir/pkg/cp-to-root
cd $startdir
cp -Rf src/nod32lfs-2.05.i386.oth/nod32lup-2.07/usr/share ./pkg/usr/
cp -Rf src/nod32lfs-2.05.i386.oth/nod32lfs-2.05/usr/share ./pkg/usr/
rm -r pkg/usr/share/man/
}
fffft!
Offline
#we're alread in $startdir/src/.../
cp -Rf nod32lup-2.07/usr/share $startdir/pkg/usr/
cp -Rf nod32lfs-2.05/usr/share $startdir/pkg/usr/
rm -r $startdir/pkg/usr/share/man/
try those as the last 3 lines... on a side note, don't you want to copy the 2.05 stuff first and then overwrite it with the 2.07 stuff instead of thother way around?
Offline
pkgname=nod32lfs
pkgver=2.05
pkgrel=1
pkgdesc="NOD32 antivirus software for Linux file server"
url="http://www.eset.com"
license=""
depends=()
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=($pkgname-$pkgver-1.i386.oth.tgz)
md5sums=(d8e4ac6892e449485d1d93d8a0416a95)
build() {
cd $startdir/src/$pkgname-$pkgver.i386.oth
tar xzf nod32*.tgz
cp -R nod32lfs-2.05/* $startdir/pkg/
cp -R nod32lup-2.07/* $startdir/pkg/
install -D -m755 $startdir/pkg/etc/init.d/nod32fac.generic $startdir/pkg/etc/rc.d/nod32
cp -R nod32lup-2.07/usr/share ./pkg/usr/
cp -R nod32lfs-2.05/usr/share ./pkg/usr/
rm -rf $startdir/pkg/usr/share/man/ $startdir/pkg/etc/init.d $startdir/pkg/cp-to-root
}
I am curious why you copy the entire contents of nod32lfs-2.05/ and nod32lup-2.07/, then later copy nod32lup-2.07/usr/share and nod32lfs-2.05/usr/share to a different location. It might be easier to copy the directories individually after the second line in the build function. Then you can just do away with some of the subsequent copying and deletion.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
I am curious why you copy the entire contents of nod32lfs-2.05/ and nod32lup-2.07/, then later copy nod32lup-2.07/usr/share and nod32lfs-2.05/usr/share to a different location. It might be easier to copy the directories individually after the second line in the build function. Then you can just do away with some of the subsequent copying and deletion.
I did it because it didn't work the other way. Now, granted, it didn't work the way I did it either, but the original PKGBUILD was much more elegant. Not as elegant as yours, though. I haven't used the install command. Purty.
EDIT: I tried yours, and it only creates an empty structure:
./pkg/etc/rc.d
I absolutely don't get it. I'm running it on two different computers, and it does the same thing. I still don't get why my PKGBUILD puts the man directory into ./pkg/usr/ and doesn't let me create a share directory.
EDIT: IT'S LIKE A FREAKIN RIPPLE IN THE FREAKIN SPACE-TIME CONTINUUM!
fffft!
Offline
try this..
prompt$ . /etc/makepkg.conf
prompt$ . PKGBUILD
prompt$ echo $startdir
Maybe your makepkg is being wonky. If there is no startdir variable, then it would follow that it will not work.[/code]
EDIT: found a typo in my above..
[code] install -D -m755 $startdir/pkg/etc/init.d/nod32fac.generic $startdir/pkg/etc/rc.d/nod32 [/code]
should be
[code] install -D -m755 $startdir/src/path/to/nod32fac.generic $startdir/pkg/etc/rc.d/nod32 [/code]
you need to use the path for nod32fac.generic, wherever it can be found.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
try this..
prompt$ . /etc/makepkg.conf prompt$ . PKGBUILD prompt$ echo $startdir
Maybe your makepkg is being wonky. If there is no startdir variable, then it would follow that it will not work.
I think that's it. It's happening on both computers though, which is wierd. It's just documentation.
Anyway, I'm trying to script some stuff for cron, and I was wondering if you guys could verify my work. I've got a weekly virus scan of Samba shares and hourly check for updates:
/etc/cron.weekly/nod32_scan:
#!/bin/sh
# Run a virus scan and clean of the Samba shares
touch /tmp/nod32.lck
nod32 /home -w -z --mail --rtp -c clean -u delete
rm -f /tmp/nod32.lck
/etc/cron.hourly/nod32_update:
#!/bin/bash
# If NOD32 isn't running, update
if [ -e /tmp/nod32.lck ]; then
echo NOD32 Running. Skipping update...
else
nod32umc -a /etc/nod32/nod32.auth -s www.eset.sk /var/lib/nod32
fi
Do these hold up? I just put the echo in there so there would be something if it tests positive.
fffft!
Offline
aha... according to the packaging guidelines, makepkg:
Removes /usr/doc, /usr/info, /usr/share/doc, and /usr/share/info from the package
(never knew this) - is this the case with you?
Offline