[aur-general] Review and a bit of other help request

Konstantin Gizdov arch at kge.pw
Thu Mar 23 20:32:29 UTC 2017


Hi Eli,

Thanks for these. As I said before I am indeed planning on cleaning up the
old style stuff. I was more interested in "experts" trying to build them
and then maybe identify problems. I currently use namcap on PKGBUILDs and
finished packages to identify and fix problems, but it's no substitute for
the real thing.

You pointed out that "make" already reads "MAKEFLAGS" on its own. Well, I
only added this, because it didn't for me for some reason. Maybe this was a
bug in the build scripts and has since been fixed. But when I picked up
ROOT and the rest of the packages, I had to manually add "${MAKEFLAGS}" in
order for "make" to accept "-j${nproc}". I will try it again.

You also point out the "hacky" way of dealing with, what I call, optional
make dependencies. So the optional dependencies that you mention can be
uninstalled fine and the packages will continue to work (excluding the
relevant features, of course). However, if the packages are not present at
build time, there is no way to enable those features in the first place.
Since this is AUR and we don't ship binaries, I was not sure how better to
deal with this. Any ideas?

Regards,
Konstantin

On Thu, Mar 23, 2017 at 4:13 AM, Eli Schwartz via aur-general <
aur-general at archlinux.org> wrote:

> On 03/22/2017 09:53 PM, Konstantin Gizdov wrote:
> > Hi again,
> >
> > So I updated xrootd and pythia and submitted the relevant deletion
> > requests. Now, can I get some package reviews? Thanks.
>
> I know nothing about the specific packages in question, so I will merely
> make some general PKGBUILD comments.
>
> ${srcdir} and ${pkgdir} must *always* be shell-quoted, as they are
> user-controlled filepaths and can contain whitespace.
>
> update-desktop-database, update-mime-database, gtk-update-icon-cache are
> pacman hooks, remove them from the root5 install file. You can probably
> also drop the pre-remove stuff by now, thereby getting rid of the
> install file altogether. (yay!)
>
> Some of your other install files imply that optional dependencies
> require being installed at build-time, in which case you should simply
> add them as makedepends. If that support means you cannot then uninstall
> them (e.g. linking to shared libraries) then they should not be optional
> at all. Automagic dependencies are *evil* and should be explicitly
> enabled or explicitly disabled.
>
> You use `[[ -d $dir ]] || mkdir $dir` several times, you can just use
> `mkdir -p $dir` which does not error when $dir already exists (and
> creates parent directories as needed also...).
>
> Make already knows how to read $MAKEFLAGS, no need to specify it on the
> command line.
>
> xrootd uses `cmake ... || return 1`, and `make || return 2`, why???
> makepkg already knows how to abort as soon as *any* error occurs.
>
> Do not list make as a makedepends, it is assumed users will have
> base-devel already installed for building packages.
>
> In root5, I would probably turn $sys_libs into a bash array on general
> principle, since bash knows how to expand them into arguments without
> depending on ugly things like word-splitting of a variable.
> ```
> declare -a sys_libs
> for sys_lib in ...; do
>    sys_libs+=("--disable-builtin-${sys_lib}")
> done
>
> ./configure ... "${sys_libs[@]}"
> ```
>
> --
> Eli Schwartz
>
>


More information about the aur-general mailing list