You are not logged in.
Hello,
At the moment I work on a package for the programm "vdr". Without any start-parameters (in this case: -c /etc/vdr) vdr save and load its config files in the folder /mnt/vdr-recordings.
In the future i would like to use the start-parameter (-c /etc/vdr). With this parameter vdr loads its config files from /etc/vdr.
vdr creates some default config files during the make process. Afterwards I copy the files from /mnt/vdr-recordings to /etc/vdr.
This work fine
Now my problem: ;-)
If I want to update vdr with a new version (pacman -U vdr-1.3.35-2.tar.gz), pacman overwrite all config files in /etc/vdr, although I changed the config files after installing vdr the first time.
According to the pacman manual pages, pacman should decide not to overwrite the file, if I have changed the installed ones (in /etc/vdr)
And finally the question ;-)
Is there any way to declare the config files in /etc/vdr as "true config files" and handle it, like pacman should do it?
The PKGBUILD:
pkgname=vdr
pkgver=1.3.35
pkgrel=2
pkgdesc="A video disk recorder softcam-plugin support"
url="http://www.cadsoft.de/vdr/"
#license=""
#depends=(libjpeg)
#makedepends=()
#conflicts=()
#replaces=()
#backup=()
#install=
source=(ftp://ftp.cadsoft.de/vdr/Developer/$pkgname-$pkgver.tar.bz2
ci.h.patch
dvbdevice.c.patch
pat.c.patch
sclink.h.patch)
md5sums=('c47d505bdf30bed26f6e82a47bb39b98' 'e97f8f07f4465b767c1159f13778d1b3'
'5169351e752ed42b96355235fb7ca1cc' '387a7c7c56c9b6bf9e98889994a3f159'
'3f7bab8b80f440a5ab88453bd4b89b84')
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np1 -i $startdir/src/ci.h.patch || return 1
patch -Np1 -i $startdir/src/dvbdevice.c.patch || return 1
patch -Np1 -i $startdir/src/pat.c.patch || return 1
patch -Np1 -i $startdir/src/sclink.h.patch || return 1
make NO_KBD=1 || return 1
make plugins
make BINDIR=$startdir/pkg/usr/bin/ MANDIR=$startdir/pkg/usr/man/ VIDEODIR=$startdir/pkg/mnt/vdr-recordings/ install
mkdir -p $startdir/pkg/etc/vdr/plugins
mkdir -p $startdir/pkg/usr/lib/vdr
cd $startdir/pkg/mnt/vdr-recordings/
install -D -m644 ca.conf $startdir/pkg/etc/vdr/ca.conf
install -D -m644 channels.conf $startdir/pkg/etc/vdr/channels.conf
install -D -m644 diseqc.conf $startdir/pkg/etc/vdr/diseqc.conf
install -D -m644 keymacros.conf $startdir/pkg/etc/vdr/keymacros.conf
install -D -m644 sources.conf $startdir/pkg/etc/vdr/sources.conf
install -D -m644 svdrphosts.conf $startdir/pkg/etc/vdr/svdrphosts.conf
rm ca.conf channels.conf diseqc.conf keymacros.conf sources.conf svdrphosts.conf
cd /usr/src/
rm -rf $pkgname-$pkgver/
mkdir -p $pkgname-$pkgver/
cp -r $startdir/src/$pkgname-$pkgver/* $pkgname-$pkgver/
rm -f vdr
ln -s $pkgname-$pkgver vdr
}
Thanks for your answers
Greetings
Flasher
Offline
You need to use the backup field.
List the config files you don't want pacman to overwrite:
backup=(etc/vdr/configfile1 etc/vdr/configfile2)
And do not put the leading / because it won't work.
Offline