You are not logged in.

#1 2023-05-13 17:14:32

Kaleidox
Member
Registered: 2023-05-13
Posts: 6

Push to AUR git fails with message "missing PKGBUILD"

Hi,
I've been trying to put an existing dotnet project on AUR; and the deal with dotnet projects is; they are usually organized using subdirectories, which AUR forbids.
"Okay, alr" I thought, "then just push the subdirectory of existing repository to AUR, nothing else is required";
So I created a PKGBUILD and a publication script that SHOULD only publish said subdirectory to AUR.
And so far, everything works, 'makepkg' finishes just fine.
But, as soon as I try to push the subdir which is initialized as a git repo to AUR, it fails with the following message:

remote: error: The following error occurred when parsing commit
remote: error: 3f7a87e36663d9e6ae771d42d6ce5667d0cabedd:
remote: error: missing PKGBUILD
remote: error: hook declined to update refs/heads/master

which makes no sense to me since the PKGBUILD file clearly is included in the directory. and by now i'm at the end of my wisdom, since i'm to be considered a beginner in terms of using AUR packages, i have no idea what to do now.

Offline

#2 2023-05-13 17:18:52

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,984

Re: Push to AUR git fails with message "missing PKGBUILD"

Being in the directory isn't enough, you have to actually add it to the git repo. It shows you the commit that's a problem, what's actually there?

Offline

#3 2023-05-13 17:38:09

Kaleidox
Member
Registered: 2023-05-13
Posts: 6

Re: Push to AUR git fails with message "missing PKGBUILD"

as you can see in the publication script, the PKGBUILD file actually gets added to this "sub"repo along with everything else thats not in the .gitignore file

Offline

#4 2023-05-13 17:39:11

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,984

Re: Push to AUR git fails with message "missing PKGBUILD"

Not in the given commit, apparently.

Offline

#5 2023-05-13 17:43:17

Kaleidox
Member
Registered: 2023-05-13
Posts: 6

Re: Push to AUR git fails with message "missing PKGBUILD"

Sorry, I don't know why it's specifically getting mad at this specific commit, when cloning the aur repo, it's still empty, so from my understanding everything that happens in this publication script will be included in the commit attempt, no?

Offline

#6 2023-05-13 17:45:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,984

Re: Push to AUR git fails with message "missing PKGBUILD"

what does `git log` show?

Offline

#7 2023-05-13 17:47:27

Kaleidox
Member
Registered: 2023-05-13
Posts: 6

Re: Push to AUR git fails with message "missing PKGBUILD"

Git log will show the history of the parent repository.
please keep in mind that I'm initializing a "child repository" that is nonexistent unless we're inside the publication script

Offline

#8 2023-05-13 17:49:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,984

Re: Push to AUR git fails with message "missing PKGBUILD"

You can't be "inside" the publication script. You either have a git repo there or you don't. If you don't, no wonder it doesn't work. There's no such things a child repos, there are things like submodules and subtrees, but that doesn't seem to be what you're talking about.

Last edited by Scimmia (2023-05-13 17:50:42)

Offline

#9 2023-05-13 17:51:43

Kaleidox
Member
Registered: 2023-05-13
Posts: 6

Re: Push to AUR git fails with message "missing PKGBUILD"

How would I publish the repository details (.git folder) to github? I have to initialize it every time and set the remote URL, there's no other way.

Although I assume this is far from pkgbuild best practice, yet I cannot come up with a better way to publish something to AUR that _has_ to be inside a subdirectory

Offline

#10 2023-05-13 18:13:39

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Push to AUR git fails with message "missing PKGBUILD"

All this stuff about directory structure comes from the mistaken idea that you should push your sources to AUR?

Offline

#11 2023-05-13 18:19:46

Kaleidox
Member
Registered: 2023-05-13
Posts: 6

Re: Push to AUR git fails with message "missing PKGBUILD"

this comes from a former error message that told me to not include directories in the AUR repository at all.
now that you mention it i could just as well maintain the AUR publication in a secondary repository, but thats a dumb solution to keep parts of the source separated. i'd prefer to have it all in one repository

Offline

#12 2023-05-13 18:46:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,984

Re: Push to AUR git fails with message "missing PKGBUILD"

It sounds like you're looking for git subtree.

Offline

Board footer

Powered by FluxBB