You are not logged in.

#1 2018-06-21 14:18:30

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

PKGBUILD for a dummy package

https://bbs.archlinux.org/viewtopic.php?id=238177 reminded me that I faced a similar issue about a year ago.

In order to ease the transition of mesa-git from standalone to a glvnd-supported build, I needed a placeholder package.
Wiki didn't have info about a dummy package, I searched packages with dummy in the name and created this :
https://aur.archlinux.org/packages/dumm … driver-git

As you can see in the aur comments it's no longer needed, but may be useful as a template for other dummy packages.
I did plan to sometime start a discussion about how and where this info should be put, but never got around to that.

Some possibilitties :

- add a PKGBUILD-dummy.proto to the pacman package

- add dummy to the https://wiki.archlinux.org/index.php/Ar … _standards as an additional guideline

Last edited by Lone_Wolf (2018-06-21 14:19:10)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2018-06-21 14:25:43

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: PKGBUILD for a dummy package

You can also drop the build() and package() function.

The following is a perfectly valid PKGBUILD:

pkgname='dummydummy'
pkgver=0.1
pkgrel=1
arch=(any)
provides=('notdummy=0.1') # thanks to loqs and allan pointing it out

But in most cases, you probably also want to add at least a pkgdesc.

EDIT: I realised I have not really answered the actual question. I would probably have added a small section about dummy/meta packages in https://wiki.archlinux.org/index.php/Creating_packages, but I don't know what the wiki admins think about this.

EDIT2: And oops, thanks to loqs below—the central part of the dummy package would probably be the "provides" here (added now) neutral

Last edited by ayekat (2018-06-22 08:42:01)


pkgshackscfgblag

Offline

#3 2018-06-21 22:28:03

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: PKGBUILD for a dummy package

Unless the pkgname matches that of the package it is replacing would you not also want provides and conflicts on the pkgname of the real package?

Offline

#4 2018-06-21 22:57:38

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

Re: PKGBUILD for a dummy package

A dummy package wouldn't conflict.  In some cases that'd be highly desirable/necessary so the dummy package could be installed prior to the non-dummy being removed (or vice versa).


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

Offline

#5 2018-06-22 01:07:56

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

Re: PKGBUILD for a dummy package

You probably want a version on the provides too...  Version often matters when resolving dependencies.

Offline

#6 2018-06-22 14:49:02

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: PKGBUILD for a dummy package

I was aware the build() function is no longer needed, but thought package() was mandatory. Just tried and makepkg does build without a package() function.

Are pkgname , pkgver , pkgrel and arch the minimum mandatory fields for a valid/buildable PKGBUILD ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2018-06-22 15:54:25

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

Re: PKGBUILD for a dummy package

wiki wrote:

Mandatory variables are pkgname, pkgver, pkgrel, and arch. license is not strictly necessary to build a package, but is recommended for any PKGBUILDs shared with others, as makepkg will produce a warning if not present.


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

Offline

#8 2018-06-24 04:10:06

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

Re: PKGBUILD for a dummy package

Lone_Wolf wrote:

I was aware the build() function is no longer needed, but thought package() was mandatory. Just tried and makepkg does build without a package() function.

To be fair, you're in good company by being surprised about this. We discussed this relatively recently in the pacman IRC channel (it came up due to my submission of this patch), and dreisner (who surely knows more than most about makepkg...) asked what the purpose of such a package was and why we allowed it.

<dreisner> what good is a PKGBUILD without a build and package function?
<dreisner> what's the output of that? an empty tarball?
<elibrokeit> A metapackage
<dreisner> fair enough

If it could slip his mind, I guess you could be forgiven too. smile

Are pkgname , pkgver , pkgrel and arch the minimum mandatory fields for a valid/buildable PKGBUILD ?

Yes. Though a metapackage which isn't meta for anything is once again and for real, fairly useless, we're not going to stop you from creating an empty tarball.


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

Offline

#9 2018-06-24 11:47:51

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: PKGBUILD for a dummy package

Actually, even (or especially) for meta-packages, the package() function serves a purpose: as there is no distinct "runtimedepends" array or similar, I believe it is a commonly used workaround to put the depends array in package(), to avoid having to install dependencies for just building a meta-package.

So this is how I generate my meta-package PKGBUILDs.


pkgshackscfgblag

Offline

Board footer

Powered by FluxBB