FS#67158 - Allow to use makepkg --printsrcinfo without require non-root user

Attached to Project: Pacman
Opened by Arry Goya (Archaygo) - Tuesday, 30 June 2020, 20:53 GMT
Last edited by Allan McRae (Allan) - Thursday, 15 December 2022, 06:26 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
Hi, I use the archlinux official docker image and would like to build packages from there.
`makepkg --printsrcinfo` refuses to work because main user in docker run as root. Create a local user to be able to run the command is convoluted.

Any chance makepkg could run some specific command with root? Or, is there a tool to generate PKGBUILD info outside makepkg?

I know the historical --asroot and I'm not familiar with the debate, I just would like makepkg to print some info.

Have a very nice day!
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 15 December 2022, 06:26 GMT
Reason for closing:  Won't implement
Comment by Eli Schwartz (eschwartz) - Tuesday, 30 June 2020, 21:04 GMT
If you intend to build packages you need a non-root user anyway.
Comment by Arry Goya (Archaygo) - Tuesday, 30 June 2020, 21:18 GMT
Hm, no not in my case.
The package only contains interpreted code, so the build process does not require makepkg in any way but for .SRCINFO.

I just stumbled upon makepkg requiring non-root to display some info and I find it makes the process more difficult than it should be.

I intend to do an entirely new pipeline to verify deployed artefacts, this one will need a non-root user.
Comment by Eli Schwartz (eschwartz) - Tuesday, 30 June 2020, 21:25 GMT
> The package only contains interpreted code, so the build process does not require makepkg in any way but for .SRCINFO.

But makepkg will not permit you to generate the actual, well, *package*, unless you are not root. What does interpreted code have to do with it?

And if your build process does not use makepkg, what are you doing with a PKGBUILD and a .SRCINFO?
Comment by Arry Goya (Archaygo) - Tuesday, 30 June 2020, 21:44 GMT
> And if your build process does not use makepkg, what are you doing with a PKGBUILD and a .SRCINFO?

Well, because makepkg is the best way to install softwares on arch I believe. Users can use an aur helper to handle the installation rather than executing an installation script by themselves.
It is more standard and convenient. I use a PKGBUILD to copy the binary (interpreted script), dependencies, configurations files, etc. following the gnu/linux best practices

To be clear: the packaging itself is handled by my VCS (tar.gz). When a new version is released, a pipeline is triggered: I want this pipeline to publish the new version of PKGBUILD to my aur GIT repository. Also, I wanted the pipeline to generate the .SRCINFO, that’s very convenient.

So, this is not a blocking issue at all. It would just be simpler with the feature I request.
Comment by Eli Schwartz (eschwartz) - Tuesday, 30 June 2020, 21:48 GMT
So this has nothing to do with interpreted code, or building packages... you don't want to *build* packages, you want to upload PKGBUILDs to the AUR.
Comment by Arry Goya (Archaygo) - Tuesday, 30 June 2020, 23:40 GMT
> So this has nothing to do with interpreted code, or building packages... you don't want to *build* packages, you want to upload PKGBUILDs to the AUR.

Yes. Sorry if it was confusing.

Loading...