It is currently Sat May 18, 2013 8:38 pm

All times are UTC




Post new topic Reply to topic  [ 277 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18, 19  Next
Author Message
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Wed Sep 17, 2008 2:13 pm 
Master of the known universe
Master of the known universe

Joined: Fri May 16, 2008 2:44 pm
Posts: 1347
Location: Munich, Germany
What about my other suggestion with nodotnew (blacklist) and dotnew (whitelist). Default: dotnew=/etc, but can be overwritten.

I think it would be more work to program though possible.

Indeed I like this idea most, coz you can keep the old behaviour of handling all files, but the user can either disable it, through blacklisting /etc or he can choose single files or directories to blacklist.


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Sun Sep 21, 2008 8:58 am 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
My idea to that problem is:
* No dotnew=() statement every file in etc will become dotnew
* dotnew=(aaa ... zzz) The packager wants only the specified files to become dotnew, similiar to the above point
* options=('noautodotnew') packager doesn't want buildpkg to handle the files in etc automatically, this option is only used when some files are in etc and the packages doesn't want them to be "dotnewd" and dotnew=(aaa ... zzz) ain't to be used, meaning not even a single file is to be dotnew, this same options has no effect if anything is put in dotnew.

Please ... suggestions on this and other subjects are welcome X!!

Regards,


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Sun Sep 21, 2008 1:40 pm 
Community Packager
Community Packager
User avatar

Joined: Sun Dec 30, 2007 10:51 pm
Posts: 839
Location: Valhalla
I like that solution as well, since it will also maintain backwards compatibility with old ZENBUILDs.

_________________
It is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring. --Carl Sagan


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Wed Sep 24, 2008 10:16 am 
Master of the known universe
Master of the known universe
User avatar

Joined: Thu Jul 26, 2007 1:28 pm
Posts: 1055
Location: Germany -> Franconia
Another suggestion:
I think files in /etc/rc.d should not be dotnew by default. They are system scripts and the packager has to care, that they are working for each package version. If some advanced user really wants to change files in /etc/rc.d he probably should rename them and disable the default ones.

EDIT:
It seems there is a bug. I have:
dotnew=('etc/ntp.conf' 'etc/ntp/ntp.keys')
in my ZENBUILD and build-ntp.sh exits with:
/home/root/zenbuilds/ntp/pkg/etc/ntp.conf was not found
The files are already renamed to .new, even the ones in /etc that are not specified by the dotnew variable.

_________________
burnCDDA (burns M3U playlists in a terminal)
last.fm (my last.fm profile)


Last edited by thenktor on Wed Sep 24, 2008 10:43 am, edited 1 time in total.

 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Wed Sep 24, 2008 10:33 am 
Master of the known universe
Master of the known universe
User avatar

Joined: Thu Jul 26, 2007 1:28 pm
Posts: 1055
Location: Germany -> Franconia
Here is a new Maintainer test code:
Code:
if [ "$(grep -e "^#Maintainer: Name <email@address.com>" $startdir/ZENBUILD)" ]; then
      err "Maintainer isn't set in ZENBUILD, exiting"
elif [ ! "$(grep -e "^#Maintainer:" $startdir/ZENBUILD)" ]; then
      err "Please specify #Maintainer: in first line of your ZENBUILD, exiting"
fi


I had no maintainer entry in some of my buildscripts, because I had
Quote:
# Maintainer: xyz

with a space between # and Maintainer in some ZENBUILDS.
The new code checks if #Maintainer: exists at all.

_________________
burnCDDA (burns M3U playlists in a terminal)
last.fm (my last.fm profile)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Nov 06, 2008 10:08 pm 
Master of the known universe
Master of the known universe
User avatar

Joined: Thu Jul 26, 2007 1:28 pm
Posts: 1055
Location: Germany -> Franconia
buildpkg exits like this:
Quote:
/home/zenbuilds/bridge-utils/pkg/etc/rc.d/rc.netbridge.conf was not found


In ZENBUILD I have specified:
Code:
dotnew=('/etc/rc.d/rc.netbridge.conf')


Furthermore it also renames /etc/rc.d/rc.netbridge, even if it is not specified in ZENBUILD.

_________________
burnCDDA (burns M3U playlists in a terminal)
last.fm (my last.fm profile)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Nov 06, 2008 10:17 pm 

Change that to
Code:
dotnew=('etc/rc.d/rc.netbridge.conf')

(No direct paths allowed)


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Nov 06, 2008 10:26 pm 
Master of the known universe
Master of the known universe
User avatar

Joined: Thu Jul 26, 2007 1:28 pm
Posts: 1055
Location: Germany -> Franconia
gapan wrote:
Change that to
Code:
dotnew=('etc/rc.d/rc.netbridge.conf')

(No direct paths allowed)


same error

_________________
burnCDDA (burns M3U playlists in a terminal)
last.fm (my last.fm profile)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Nov 06, 2008 10:29 pm 

Are you sure the file is in pkg/etc/rc.d ?


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Nov 06, 2008 11:35 pm 
Master of the known universe
Master of the known universe
User avatar

Joined: Thu Jul 26, 2007 1:28 pm
Posts: 1055
Location: Germany -> Franconia
gapan wrote:
Are you sure the file is in pkg/etc/rc.d ?


Code:
root[bridge-utils]# ls pkg/etc/rc.d/
rc.netbridge.conf.new  rc.netbridge.new

_________________
burnCDDA (burns M3U playlists in a terminal)
last.fm (my last.fm profile)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Nov 06, 2008 11:49 pm 

You should not name it .new yourself.


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Thu Nov 06, 2008 11:59 pm 
Master of the known universe
Master of the known universe
User avatar

Joined: Thu Jul 26, 2007 1:28 pm
Posts: 1055
Location: Germany -> Franconia
gapan wrote:
You should not name it .new yourself.


Of course ;D Take a look to my ZENBUILD. this is done right after make:

Code:
cat << "EOF" > $startdir/pkg/etc/rc.d/rc.netbridge.conf || return 1
IFNAME[0]="br0"
BRINTERFACES[0]="eth2 eth3 eth4"
BRSTP[0]="on"
BRPRIO[0]=""
BRFD[0]=""
BRHELLO[0]=""
BRMAXAGE[0]=""
EOF


EDIT: As far as I remember I had the same problems with other zenbuilds that have worked well before, too. Workaround was to remove the whole dotnew section and let buildpkg crate .new files for all files in /etc.

_________________
burnCDDA (burns M3U playlists in a terminal)
last.fm (my last.fm profile)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Fri Nov 07, 2008 9:26 am 

Can you post your ZENBUILD? I never had problems with dotnew.


  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Fri Nov 07, 2008 10:38 am 
Master of the known universe
Master of the known universe
User avatar

Joined: Thu Jul 26, 2007 1:28 pm
Posts: 1055
Location: Germany -> Franconia
Code:
#Maintainer: Thorsten Muehlfelder <thenktor@gmx.de>

# Mandatory
pkgname=bridge-utils
pkgver=20081106
pkgrel=1
zenver=54
arch=i486
source=("rc.netbridge" "http://thenktor.dyndns.org/packages/$pkgname/$pkgname-$pkgver.src.tar.gz")
sourcetemplate=http://thenktor.dyndns.org/packages/$pkgname/
dotnew=('etc/rc.d/rc.netbridge.conf')
url="http://www.linuxfoundation.org/en/Net:Bridge"
docs=('FAQ' 'FIREWALL' 'HOWTO' 'README' 'COPYING' 'PROJECTS')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname - (network Ethernet bridging utilities)"
""
"This package contains utilities for configuring Linux Ethernet"
"bridges.  The Linux Ethernet bridge can be used for connecting"
"multiple Ethernet devices together.  The connecting is fully"
"transparent.  Hosts connected to one Ethernet device see hosts"
"connected through a bridge to the other Ethernet devices directly."
)

build() {
   cd $startdir/src/${pkgname}
   aclocal || return 1
   autoconf || return 1
   ./configure --prefix=/usr --sysconfdir=/etc || return 1
   make -j3 || return 1
   make DESTDIR=$startdir/pkg install
   mkdir -p $startdir/pkg/etc/rc.d/
   cd $startdir/src
   cp rc.netbridge $startdir/pkg/etc/rc.d || return 1
   chmod 644 $startdir/pkg/etc/rc.d/rc.netbridge || return 1
   cat << "EOF" > $startdir/pkg/etc/rc.d/rc.netbridge.conf || return 1
IFNAME[0]="br0"
BRINTERFACES[0]="eth2 eth3 eth4"
BRSTP[0]="on"
BRPRIO[0]=""
BRFD[0]=""
BRHELLO[0]=""
BRMAXAGE[0]=""
EOF
   chmod 644 $startdir/pkg/etc/rc.d/rc.netbridge.conf
}


buildpkg version: 1.6.0

_________________
burnCDDA (burns M3U playlists in a terminal)
last.fm (my last.fm profile)


 Profile Send private message  
 
 Post subject: Re: buildpkg - a new way to build packages
PostPosted: Fri Nov 07, 2008 10:49 am 

It works fine here! I think it's that buggy dotnew code that dotnews every file in /etc by default that's causing your problems. I have that commented out and I think everybody else should too. ;)

You can comment out lines 685-694 in /usr/bin/buildpkg to correct that:
Code:
   # add files in etc to dotnew (if it wasn't defined)
   #if [ ! "\$dotnew" ]; then
   #   if [ -d \$startdir/pkg/etc ]; then
   #      cd \$startdir/pkg/
   #      for conf in \$(find ./etc -type f) ; do
   #         conf=\${conf: 2}
   #         dotnew=( "\${dotnew[@]}" "\$conf" )
   #      done
   #   fi
   #fi


BTW, you don't need to add a blank line after the 1st one in the slack-desc yourself, buildpkg does it for you.


  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 277 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18, 19  Next

All times are UTC


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
 
cron