You are not logged in.

#1 2007-03-22 00:27:34

fancris3
Member
Registered: 2007-03-18
Posts: 67

resmgr

Apology for my English.
Yesterday I put k3b 1.0 and I thing its a little bug in pkg because when click Device->Mount (without to select device) k3b decease.
So I make k3b-svn:

# Contributor: fancris3 <fancris3 at aol.com>
pkgname=k3b-svn
pkgver=`date +%Y%m%d`
pkgrel=1
pkgdesc="Feature-rich and easy to handle CD burning application"
arch=(i686)
url="http://k3b.sourceforge.net/"
license=('GPL')
depends=('cdrdao' 'cdrkit' 'cdparanoia' 'kdelibs>=3.5.6' 'libsamplerate'
     'normalize' 'sox' 'hal>=0.5.8.1-6' 'ffmpeg>=20070131' 'musicbrainz' 
     'taglib>=1.4' 'libmpcdec>=1.2.5' 'libdvdread' 'dbus-qt3' 'flac>=1.1.4' 'dvd+rw-tools' )
makedepends=('subversion' 'automake')
conflicts=('k3b')
provides=('k3b')

_svntrunk=svn://anonsvn.kde.org/home/kde/trunk/extragear/multimedia/k3b
_svnmod=multimedia/k3b
_svntrunk1=svn://anonsvn.kde.org/home/kde/trunk/extragear/multimedia
_svnmod1=multimedia
_svntrunk2=svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
_svnmod2=multimedia/admin

build() {
  [ -z "${QTDIR}" ] && . /etc/profile.d/qt.sh
  [ -z "${KDEDIR}" ] && . /etc/profile.d/kde.sh

  cd $startdir/src

  svn co $_svntrunk $_svnmod
  msg "SVN checkout done or server timeout"

  svn co -N $_svntrunk1 $_svnmod1
  msg "SVN checkout done or server timeout"
 
  svn co $_svntrunk2 $_svnmod2
  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  cp -r multimedia multimedia-build
  cd multimedia-build
  make -f Makefile.cvs
  ./configure --prefix=/opt/kde --with-k3bsetup=no
  make || return 1
  make DESTDIR=$startdir/pkg install
  rm -rf $startdir/src/multimedia-build
}

But I see "resmgr no" in output of ./configure. In original page http://www.lst.de/~okir/resmgr/ the source is old, deb have a patch but its for deb smile.
I found a new source in suse ftp and I make this PKGBUILD :

# Contributor: fancris3 <fancris3 at aol.com>
pkgname=resmgr
pkgver=1.1.0
pkgrel=1
_nsvn=_SVNr123
pkgdesc="This is a resource manager that will provide unprivileged users access to device files."
arch=(i686)
url="http://forge.novell.com/modules/xfmod/project/?resmgr"
#url="http://www.lst.de/~okir/resmgr/"
license=('GPL')
depends=('pam' 'glibc')
makedepends=('rpmextract' 'bzip2')
source=(ftp://ftp.univie.ac.at/systems/linux/suse/update/10.2/rpm/src/${pkgname}-${pkgver}${_nsvn}-9.2.src.rpm resmgr)
md5sums=('31b74ff4c73e969955c8976f1e865a7f' '1143f9fbb80fdaebf723e187cb6f8663')

build() {
  rpmextract.sh ${pkgname}-${pkgver}${_nsvn}-9.2.src.rpm
  bunzip2 ${pkgname}-${pkgver}${_nsvn}.tar.bz2
  tar -xf ${pkgname}-${pkgver}${_nsvn}.tar
  cd ${pkgname}-${pkgver}${_nsvn}
#  patch -Np0 -i ../resmgr-r128.diff
  ./configure --libdir=/lib --sbindir=/sbin --mandir=/usr/man --sysconfdir=/etc --includedir=/usr/include --with-pam
  make || return 1
  mkdir -p $startdir/pkg/etc/rc.d
  install -m 755 $startdir/src/${pkgname} ${startdir}/pkg/etc/rc.d/
  make DESTDIR=$startdir/pkg install
}

rc.d/resmgr

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting resource manager"
    /sbin/resmgrd
    if [ $? -gt 0 ]; then
      stat_fail
    else
      stat_done
      add_daemon resmgr
    fi
    ;;
  stop)
    stat_busy "Shutting down resource manager"
    /sbin/resmgrd -k
    if [ $? -gt 0 ]; then
      stat_fail
    else
      stat_done
      rm_daemon resmgr
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac

Seem to work good (new user,  without to add to any extra groups have access to sound, cd ..),and have remgr x64 and hal-resmgr but I don't try.
Please write your opinion about my PKGBUILD's, resmgr is usefulness for Arch ?
Thanks.

Offline

#2 2007-03-25 16:02:49

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: resmgr

I think the meaning of your English is clear. If I have misunderstood what you have written, please reply to correct me. The best way to find out whether there is interest is to submit your PKGBUILD to the AUR and see whether you get votes. I can offer a few suggestions to make your resmgr package more compliant with Arch conventions.

The description should be 80 characters or less. For example,

pkgdesc="A resource manager for unprivileged user access to device files."

PKGBUILD lines should be 100 characters or less. For example,

source=(ftp://ftp.univie.ac.at/systems/linux/suse/update/10.2/rpm/src/\
${pkgname}-${pkgver}${_nsvn}-9.2.src.rpm resmgr)

It is recommended to install and use the namcap application when developing packages. In your case, namcap reports that pam is not needed as a dependency (pam is already required by the base system).

It is OK to place one item in /etc, but if you have more than one (in your case, two, a configuration file and a directory), you should put them in a subdirectory of /etc, for example, /etc/resmgr. System binaries should go in /usr/sbin, and libraries in /usr/lib.

./configure --libdir=/usr/lib --sbindir=/usr/sbin --mandir=/usr/man \
--sysconfdir=/etc/resmgr --includedir=/usr/include --with-pam

If the makefile does not let you specify different locations for libresmgr.so and pam_resmgr.so, you may need to add some code to the end of your build script to move $startdir/pkg/usr/lib/security to $startdir/pkg/lib.

Review the man pages for makepkg and pacman to see how to protect your configuration file against being deleted during package updates. Note the use of a relative path. For example,

backup=etc/resmgr/resmgr.conf

If the person installing the package needs to take additional steps to make the package fully functional, use an install script to provide this information. In your case, the user should be told how to make the daemon startup automatically. For an example, see my elog package in the AUR. The install script will be included in your package tarball, but is not listed in the source or md5sums lines. It is listed in an "install=resmgr.install" line.

I'm not comfortable with $startdir/pkg/lib/pkgconfig/resmgr.pc. We normally do not put text files into /lib. Resources read by the application as it runs can be put into /usr/share/resmgr. Configuration files belong in /etc/resmgr. Resources read and written by the application might belong in /var. Is this file required for the proper operation of resmgr? If it is changed, will the operation of resmgr change? Will it be changed by the system administrator or the daemon? Why does it begin with "prefix=/usr/local" when your build does not use /usr/local? Is this file an artifact of the SuSE rpm which is not needed in Arch?

Thanks for contributing to Arch!

Offline

#3 2007-03-26 21:07:57

fancris3
Member
Registered: 2007-03-18
Posts: 67

Re: resmgr

It is exactly what i want.
Thanks.

Offline

Board footer

Powered by FluxBB