You are not logged in.

#1 2009-12-03 01:31:56

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

[Idea] Pacman helper for custom flags

First of, a disclaimer, this is not an original idea, I saw this posted somewhere on the forums but can't locate it now...

I propose a pacman helper app (a wrapper, so to speak) which does the following:-
1. Transparently performs pacman's standard commands (sort of like how yaourt behaves)
2. Allows user to specify certain packages to be self-compiled with custom options.
3. When said packages are updated in the repos, this app will re-compile with the custom options previously specified.

This will allow, for example, those who don't want --enable-dbus to remove it from a particular package without having to maintain/update their own PKGBUILDs or use the AUR (referring to a recent ML thread). Or, perhaps, it would reduce/eliminate the need for packages such as mpd-pulse, which is basically mpd with an --enable-pulse line.

I propose the app work as following:-

A. Specifying Package to custom-build
I was figuring this app could have an additional switch (-Z for lack of a better idea), such that:-

<appname> -Z xorg-server

would prompt the user to select a text editor (such as already done in yaourt with AUR packages to edit PKGBUILDS). The user would make the changes necessary (most likely just --enable or --disable to ./configure options).

The app would then have to diff the original PKGBUILD with the user's edited one and create a patch, saving it somewhere.

B. Updating with -Syu
I figure the easiest way would be for the app to generate a local repo, which would be added above all the existing repos in /etc/pacman.conf. During an update (Syu) process, the following would take place within the app:-
1. pacman -Sy
2. app checks the packages it is keeping track off against /var/lib/pacman for any updates, and runs the following:-
  a. applies the saved patch from the original user's change
  b. makepkg (or sudo makepkg -i)
  c. OPTIONAL: if a. and b. were successful, create a new patch between the patched PKGBUILD and the original. This is to allow for PKGBUILDs which update over versions.
3. pacman -Su

Of course, if <appname> -Su was run, step 1 above would be skipped.

Comments?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#2 2009-12-03 02:26:59

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: [Idea] Pacman helper for custom flags

I'm not sure it's feasible to programmatically alter the configure flags of a package -- some are passed to ./configure, others to ./autogen.sh, and some (eg firefox) are in a separate file.  It's pretty simple to make the adjustment yourself, compile it, and add the package to IgnorePkg if you don't want pacman to update it from the repos.

Offline

#3 2009-12-03 02:52:56

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: [Idea] Pacman helper for custom flags

srcpac - it does what you suggest.   Or at least should...  it has been a bit unmaintained for a while but got a new maintainer recently so any issues are being addressed.

Offline

#4 2009-12-03 03:08:15

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [Idea] Pacman helper for custom flags

tavianator wrote:

I'm not sure it's feasible to programmatically alter the configure flags of a package -- some are passed to ./configure, others to ./autogen.sh, and some (eg firefox) are in a separate file.  It's pretty simple to make the adjustment yourself, compile it, and add the package to IgnorePkg if you don't want pacman to update it from the repos.

I suggested using patches, which should work regardless of where the flags are. The user would be required to do this though.

Thanks Allan, will look in to it.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB