eli-schwartz / aurpublish Goto Github PK
View Code? Open in Web Editor NEWPKGBUILD management framework for the Arch User Repository
License: GNU General Public License v2.0
PKGBUILD management framework for the Arch User Repository
License: GNU General Public License v2.0
After I have changed my AUR password, I can no longer use aurpublish
.
I get this error:
git push using: aur:kodi-addon-checker.git master
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Is there an easy way to fix this (maybe not an aurpublish
issue)?
Somehow for the last few weeks (since about the time https://gitlab.archlinux.org/archlinux/devtools/-/commit/be5f54c95cbbcf46598e23aa456075cbb26806c0 would have landed in devtools, which seems to be similar but orthagonal to the AUR hosting or aurpublish tooling) AUR I've been having trouble with most (but strangely not quite all) of the packages in my aurpublish managed repository to the AUR. Most of them fail to push being blocked by the hook. They seem to be trying to push the initial commit to my repo which is just the readme, nothing relevant to the subtrees for each package.
Line 145 in f88c7ae
The script sets the SSH remote as aur
(with no way of changing it), relying on the .ssh/config
to convert it to [email protected]
+ pointer to the correct key.
In my case, I use standard keys for accessing AUR, so I'm forced to add config lines in the SSH-config just to make the mapping aur
=> [email protected]
. For such simple thing, a zero-conf' setup may be better. But I can't have that zero-conf', as I can't change the SSH remote used by the script.
Is there a special need to depend on .ssh/config
?
When there is already a folder containing a package with the name of pkgname
, it will break as it thinks it has already been included.
Lines 142 to 148 in 11aeeaa
Can't is_package_in_git
improve to check this too?
Lines 47 to 49 in 11aeeaa
I have found this command to check configured git subtrees: git log | grep git-subtree-dir | tr -d ' ' | cut -d ":" -f2 | sort | uniq
, but it will already break if subtree has been added and folder removed later, so I'm not sure about this.
There should be a default .gitignore provided (if there isn't one already in the directory? we probably don't want to clobber an already-existing .gitignore, but maybe append to an existing one). I usually go with
/*
!/.gitignore
!/PKGBUILD
!/.SRCINFO
which ignores everything in the root project project directory other than what is necessary; the user can manually exclude more files if they wish to keep some file from the source
s in the AUR itself (maybe say that in a comment?).
Steps to Reproduce:
mkdir test
cd test
git init
Initialized empty Git repository in /home/samps/packages/test/.git/
touch README.md
git add -A
git commit -am "initial"
[master (root-commit) 2602425] initial
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
aurpublish --pull heroku-cli
git fetch aur:heroku-cli.git master
ssh: Could not resolve hostname aur: Name or service not known
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.
To repro:
mkdir test && cd test
git init
aurpublish -p <anypackage>
This results in:
fatal: Not a valid object name HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Working tree has modifications. Cannot add.
I think your script is useful, could you publish it to AUR as aurpublish-git
? Would love to install and update it using the same approach as for other packages that I use.
Use aurpublish to do it 😝
I do like the prepare-commit-msg hook, but feel it's overkill for packages that change package versions frequently like VCS packages.
An option to suppress the hook temporarily or permanently for specific packages would help .
Possible invocations :
aurpublish -rm_auto_commit_hook PACKAGE
aurpublish -suppress_auto_commit_hook_once PACKAGE
After this commit, simon04/pkgbuilds@5b853c5, I have changes in my staging area as well in the working directory. Presumably this is due to the pre-commit
hook.
$ git status .
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: .SRCINFO
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .SRCINFO
$ git diff --staged
diff --git a/wikibase-cli/.SRCINFO b/wikibase-cli/.SRCINFO
index 06a7263..428104e 100644
--- a/wikibase-cli/.SRCINFO
+++ b/wikibase-cli/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = wikibase-cli
pkgdesc = The command-line interface to Wikibase (Wikidata)
- pkgver = 9.0.2
+ pkgver = 9.0.1
pkgrel = 1
url = https://github.com/maxlath/wikibase-cli#readme
arch = any
@@ -8,10 +8,10 @@ pkgbase = wikibase-cli
makedepends = npm
depends = nodejs
replaces = nodejs-wikibase-cli
- noextract = wikibase-cli-9.0.2.tgz
+ noextract = wikibase-cli-9.0.1.tgz
options = !strip
- source = https://registry.npmjs.org/wikibase-cli/-/wikibase-cli-9.0.2.tgz
- sha256sums = 1e6b60998f1c636f86755d58ac98f8c1cd14ffab8484a713d5418b1bb6e1f164
+ source = https://registry.npmjs.org/wikibase-cli/-/wikibase-cli-9.0.1.tgz
+ sha256sums = 278fe41bf562d0150154eb25080e7a1f03a9e534086229b02f5a6ec6ecccfb40
pkgname = wikibase-cli
$ git diff
diff --git a/wikibase-cli/.SRCINFO b/wikibase-cli/.SRCINFO
index 428104e..06a7263 100644
--- a/wikibase-cli/.SRCINFO
+++ b/wikibase-cli/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = wikibase-cli
pkgdesc = The command-line interface to Wikibase (Wikidata)
- pkgver = 9.0.1
+ pkgver = 9.0.2
pkgrel = 1
url = https://github.com/maxlath/wikibase-cli#readme
arch = any
@@ -8,10 +8,10 @@ pkgbase = wikibase-cli
makedepends = npm
depends = nodejs
replaces = nodejs-wikibase-cli
- noextract = wikibase-cli-9.0.1.tgz
+ noextract = wikibase-cli-9.0.2.tgz
options = !strip
- source = https://registry.npmjs.org/wikibase-cli/-/wikibase-cli-9.0.1.tgz
- sha256sums = 278fe41bf562d0150154eb25080e7a1f03a9e534086229b02f5a6ec6ecccfb40
+ source = https://registry.npmjs.org/wikibase-cli/-/wikibase-cli-9.0.2.tgz
+ sha256sums = 1e6b60998f1c636f86755d58ac98f8c1cd14ffab8484a713d5418b1bb6e1f164
pkgname = wikibase-cli
To fix this, I have to run git reset HEAD
.
When someone stops maintaining an aur package they should be able to remove it from the split repo used by aurpublish.
Maybe a command to do this could be added ?
A possible invocation : aurpublish -rm PACKAGE
example: ImperatorStorm/PKGBUILDs@3dec2a7
https://github.com/aminvakil/aur/actions/runs/7310240478/job/19918672631
git push using: aur:zoiper-bin.git master
fatal: cache for d6a34f40a60a78154048a8c37e1d3463f9138ea7 already exists!
Previous to this I've accidentally had a merge commit adding this subtree to master branch, but I've dropped that commit and I still get this, I don't know what to do.
Nothing is changing, just aurpublish zoiper-bin
which is a package I'm maintaining.
Is there any feature similar to being able to .gitignore a file specifically for publish? I have a git submodule inside of one package that I'd prefer not to gitignore, but the AUR doesn't accept repos with submodules
I am trying to use aurpublish to push a package which also needs to be patched: https://github.com/acxz/pkgbuilds/tree/master/python-ray
In particular we are pulling the patch from an upstream commit instead of having a local copy of it in the repo.
However, I am receiving the following output:
git push using: aur:python-ray.git master
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 787 bytes | 787.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
remote: error: The following error occurred when parsing commit
remote: error: 34d68f63bcaa768706971f89c02da22ebf951adb:
remote: error: missing source file: python-ray-0.8.4.patch
remote: error: hook declined to update refs/heads/master
To aur:python-ray.git
! [remote rejected] 34d68f63bcaa768706971f89c02da22ebf951adb -> master (hook declined)
error: failed to push some refs to 'aur:python-ray.git'
Is this a bug? How can I get around this issue?
Thank you!
Sometimes adding changes goes wrong and people have trouble reverting to a known good state.
A simple way to solve this with a single git repo is to remove the local git repo and re-clone the upstream repo .
having a command to do this in the aurpublish combined repo would be a good thing.
possible invocation aurpublish -reset PACKAGE
If the user as a global core.hooksPath
hook set (example: yours truly), aurpublish setup
doesn't work.
One needs to explicitly set git config core.hooksPath .git/hooks
in the aurpublish-backed repository.
Thinking a bit deeper about this, I don't think it's an aurpublish bug per se, it feels more like a bug in git
.
I'd argue git should honor the implicit local hooks path over the global one if at least one hook exists therein.
Anyway, just wanted to file this as a heads up. aurpublish
could optionally take care of this defensively by calling git config core.hooksPath .git/hooks
as part of aurpublish setup
. If you would like a PR I am happy do send you one. If you think this is unnecessary, feel free to close the issue, of course.
I've been using aurpublish
for some time to manage this repository of AUR packages that I (co-)maintain. I've gotten into a few messes (usually because I work on packages from more than one machine and then have to cobble the history together without breaking git subtree
) but am usually able to get out of them. All packages do publish...except one.
For some reason my chomsky-font base package has gone wonky. My usual bump routine ended with a segfault. Because I was on hardware with a serious south bridge issue I kind of just ignored it and figured it had memory problems. I pushed the commit to my repo without getting the subtree pushed to the AUR.
Now I'm trying from another machine with stable hardware and realize there is still a problem:
$ pwd
/home/caleb/projects/aur/chomsky-font
$ aurpublish $(basename $PWD)
git push using: aur:chomsky-font.git master
/usr/lib/git-core/git-subtree: line 757: 98078 Done eval "$grl"
98079 Segmentation fault (core dumped) | while read rev parents; do
process_split_commit "$rev" "$parents" 0;
done
I've tried a few things such as checking out the repository before the last commit on that package, running aurpublish -p chomsky-font
, and redoing the bump. Nothing flies, for some reason any attempt I make to publish that package to the AUR now results in a segfault no matter what machine I try from.
post-commit shows
error: $pkgname/.SRCINFO: does not exist and --remove not passed
fatal: Unable to process path $pkgname/.SRCINFO
Hey @eli-schwartz I thought I'd ask if you have interest in and time to maintain this going forward. I understand you've been a bit less involved in Arch packaging lately. I don't know what your plans are — whether you are still using Arch and/or where AUR package maintenance stacks up on your list. This particular project has languished just a bit recently, but some of us –myself included– rely on it constantly.
I'd consider taking up maintenance if you don't plan to.
I stumbled across this tool from this thread as I was looking for a way to manage PKGBUILDs. I was wondering if there's anything AUR-specific to this tool such that it can't be used for PKGBUILDs used to build Arch packages from the official repositories. Besides PKGBUILDs from the AUR, I have also modified PKGBUILDs that were used to build Arch packages and I would like to manage those as well.
I suppose these modified PKGBUILDs are no different than those hosted in the AUR, although I don't intend to host them on the AUR because they are too personalized.
If not, what do you suggest?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.