You are not logged in.

#1 2020-10-20 16:21:04

G3ro
Member
Registered: 2020-09-24
Posts: 33

[Policy Request] Seperate PKGBUILDs for different packages

As the PKGBUILDs in AUR are used to compile & install packages, it would be useful to tell maintainers that they should split PKGBUILDs that do not necessarily need to be put together.

One example is anbox-git, which includes both "anbox-git" and "anbox-modules-dkms-git".
The second package is not necessary and not supported on newer kernels anymore.

So it would be convenient to split the PKGBUILD into two packages instead.

Offline

#2 2020-10-20 18:05:06

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: [Policy Request] Seperate PKGBUILDs for different packages

i see tow packages

and are you sure it's not necessary ?

ezik

Offline

#3 2020-10-20 19:56:55

G3ro
Member
Registered: 2020-09-24
Posts: 33

Re: [Policy Request] Seperate PKGBUILDs for different packages

@shulamy:

1. Yes there are two packages, but from one PKGBUILD only, which is the point.

2. Yes I am sure, that it is not necessary anymore, because it does not work anymore. You can read about that on the Anbox wiki page.
But the point is not this package alone, it is the concept of putting two or more packages in one PKGBUILD, which is not convenient (in/for all cases).

Offline

#4 2020-10-20 20:00:23

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [Policy Request] Seperate PKGBUILDs for different packages

There is an implicit understanding that a split package is used if the same sources build two or more different packages. Adding two different sources in the same package and then split them again later is bad practice. I don't know of any written guidelines about that, though.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2020-10-20 20:37:45

G3ro
Member
Registered: 2020-09-24
Posts: 33

Re: [Policy Request] Seperate PKGBUILDs for different packages

progandy wrote:

There is an implicit understanding that a split package is used if the same sources build two or more different packages. Adding two different sources in the same package and then split them again later is bad practice. I don't know of any written guidelines about that, though.

Update: Sry misunderstood your post smile.

Last edited by G3ro (2020-10-21 18:06:22)

Offline

#6 2020-10-20 21:05:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,515
Website

Re: [Policy Request] Seperate PKGBUILDs for different packages

I don't see how progandy is supporting your proposal, he explained the criteria for split packages (one PKGBUILD that makes more than one package).  The example you provided meets the criteria, and by that logic should be a single PKGBUILD.

If one of the resulting packages is faulty and / or no longer necessary, that is a different issue.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2020-10-21 18:37:12

G3ro
Member
Registered: 2020-09-24
Posts: 33

Re: [Policy Request] Seperate PKGBUILDs for different packages

Trilby wrote:

I don't see how progandy is supporting your proposal, he explained the criteria for split packages (one PKGBUILD that makes more than one package).

Ok, deleted my comment about that.

Trilby wrote:

The example you provided meets the criteria, and by that logic should be a single PKGBUILD.

I would like that to be added to the guidelines (couldn't find it, but maybe I oversaw it).
Whom should I talk to about it?
Should I post it in the Wiki Discussion?

Trilby wrote:

If one of the resulting packages is faulty and / or no longer necessary, that is a different issue.

Well it can still be used on linux-lts, so some people would like to keep it.
I already wrote to the maintainer, we will see if and when they respond.

Offline

#8 2020-10-21 19:39:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,515
Website

Re: [Policy Request] Seperate PKGBUILDs for different packages

As noted above - there likely isn't any specific documentation for if / when a package should be split.  The criteria are not precise, but rather there are just some historical guidelines (much just from common sense).

First recognize that singular packages were the predecessor to split packages (hence the name); this is in contrast to there being multiple packages that get merged together (which would have been called merged packages, or franken-packages ...)

When there is one (set of) source(s) and one build process, there only needs to be one PKGBUILD.  Having a second one would be redundant.  And initially this would have produced one package.  But in some cases, it was determined that singular upstream sources built several optional bits that many users may not want - and they may be cumbersome.

The traditional examples are packages for which upstream provides both a gtk and qt frontend UI - or a python2 and python3 version.  A single upstream source creates all of these options, but most users would only want to install one or the other.  So the gtk and qt content of a single package is split into two packages.

So the question has never been "should this be a split package or two seperate packages?" but only "should this be a split package or a unified package?"  This later question is where the criteria are a bit subjective, but the former question really doesn't need to be asked.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2020-10-25 20:33:09

G3ro
Member
Registered: 2020-09-24
Posts: 33

Re: [Policy Request] Seperate PKGBUILDs for different packages

I guess I will simply ask in the wiki.

Offline

#10 2020-10-25 21:39:29

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Policy Request] Seperate PKGBUILDs for different packages

I find myself completely confused by https://aur.archlinux.org/cgit/aur.git/ … =anbox-git

There are 4 source downloads.

#1 is used for pkgver(), build(), and package_anbox-git()

#3 and #4 are submodules of #1

#2 is used for nothing other than package_anbox-modules-dkms-git(), which is an optdepends of the first split package.

So, it is literally one package randomly included inside another, does not share source code or build processes, and loses its ability to have a unique $pkgver

...

Trilby, I don't understand your comment "The example you provided meets the criteria, and by that logic should be a single PKGBUILD." Am I completely missing something?

I don't see a single reason to use one PKGBUILD, it seems to be a clear-cut policy violation.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#11 2020-10-25 22:13:15

G3ro
Member
Registered: 2020-09-24
Posts: 33

Re: [Policy Request] Seperate PKGBUILDs for different packages

eschwartz wrote:

I find myself completely confused by https://aur.archlinux.org/cgit/aur.git/ … =anbox-git

There are 4 source downloads.

#1 is used for pkgver(), build(), and package_anbox-git()

#3 and #4 are submodules of #1

#2 is used for nothing other than package_anbox-modules-dkms-git(), which is an optdepends of the first split package.

So, it is literally one package randomly included inside another, does not share source code or build processes, and loses its ability to have a unique $pkgver

...

Trilby, I don't understand your comment "The example you provided meets the criteria, and by that logic should be a single PKGBUILD." Am I completely missing something?

I don't see a single reason to use one PKGBUILD, it seems to be a clear-cut policy violation.

Thank you very much.
I misunderstood the former comments, I thought they understood the problem and agreed for it to be at least bad practice; seems now I was wrong about that.

My request is to explain exactly that in the Package Guidelines of the wiki: when one can/or should use one PKGBUILD and when to use seperate PKGBUILDs.
Because I could not find such a policy.

Regarding anbox-git: it seems the maintainer never answers any comments on AUR, so maybe after waiting some more time, other steps could be taken?

Offline

#12 2020-10-25 22:23:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,515
Website

Re: [Policy Request] Seperate PKGBUILDs for different packages

eschwartz wrote:

Trilby, I don't understand your comment "The example you provided meets the criteria, and by that logic should be a single PKGBUILD." Am I completely missing something?

I based my assessment on the single build process - only one unified call to make.  There is no distinct build processes that could be split.  The fact that submodules are used to build in additional features doesn't change this.

If the dkms part doesn't even need to be built then this perhaps should be seperate.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2020-10-25 22:36:08

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Policy Request] Seperate PKGBUILDs for different packages

Aha, so you simply overlooked that the dkms module wasn't even being built in build(). Makes sense.

I guess we're all in agreement, then. This should get a new PKGBUILD just for package_anbox-modules-dkms-git().


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB