You are not logged in.
I have a PKGBUILD in the AUR for my recent creation ttwm.
Installing from the AUR is a nice convenience (over a git pull, and manual build), but this hinders customization through the config.h which must be modified prior to recompiling.
I have come up with two ideas that may allow the best of both options.
1) Include a command in the PKGBUILD such as
$EDITOR config.h
which will allow the user to edit the config file right before the make command. I know this will work, but I don't know if would be appropriate. Are PKGBUILD expected to run 'uninterupted' or is expecting user input like this acceptable?
2) Include a command to copy a file from the user's home director (perhaps a ~/.ttwm.conf) to config.h - eg
[[ -f ~/.ttwm.conf ]] && cp ~/.ttwm.conf ./config.h
I'm not yet sure if this would even work: can makepkg access something outside the fakeroot environment like this? And would this be acceptable, or is reading from the user's home dir inappropriate?
Any feedback would be appreciated. I want to make building the package as easy as possible, but I also want to ensure the PKGBUILD doesn't violate any standards of expected behavior.
Last edited by Trilby (2012-08-16 21:28:00)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
AFAIK no, PKGBUILDs should be non-interactive.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
PKGBUILDs should be non-interactive.
In addition, a single PKGBUILD file should produce the same package independent of which computer it's compiled on.
Offline
Sounds good, thanks.
I'll just stick with two installation guidelines: AUR for simple "previewing" and manual building to allow configuration.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
I think you could allow a custom config file or opening the editor depending on an environment variable. If it is not present then the package is built with the default settings. I think this is appropriate when the application is configured at compile time.
It is not too important, though since it is very easy to add a breakpoint to the PKGBUILD with read or just add the editor or copy command manually.
Edit: I like the idea of a console message in build() and/or post_install that reminds the user of modifying config.h just like in the package for tabbed.
Last edited by progandy (2012-08-16 21:48:58)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Yep, for now I'm just modifying the PKGBUILD every time I use it.
Whenever I push a change on github I want to make sure it builds properly from the AUR, but I don't want to loose my own settings. So I just build as is once to ensure it works, then I change the PKGBUILD to copy in my config.h and rebuild. Of course I could build but not install the update - but then I wouldn't benefit from the changes I made.
I have already been violating drcouzelis's advice though as the PKGBUILD uses "$USER" in the build process - so the package built on one machine will not be exactly the same as that built on another.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
I have already been violating drcouzelis's advice though as the PKGBUILD uses "$USER" in the build process - so the package built on one machine will not be exactly the same as that built on another.
That has already lead to an error in the default config:
#define AUD_FILE "/home/jmcclure/.audio_volume"
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Oops. No, that was just me being to quick on pushing an update from a version I had been modifying. That mistake would have been there either way. That one is fixed now.
Last edited by Trilby (2012-08-17 01:03:46)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
My linux-ice and linux-rt-ice PKGBUILDs use environment variables and user-conf files (if selected). For me the most important thing is that a 'general' install works non-interactively. If the user wants something different, they'd have to edit the PKGBUILD themselves (or just let them set an env variable).
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