Giter VIP home page Giter VIP logo

aurpublish's People

Contributors

alerque avatar alyptik avatar aminvakil avatar archangegabriel avatar eli-schwartz avatar rafasc avatar stevenbenner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aurpublish's Issues

aurpublish breaks after AUR password changed

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)?

Subtree history including irrelevant commit

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.

Dependency on SSH config's entry

git subtree pull -P "${package}" aur:${pkgbase}.git master -m "Merge subtree '${package}'"

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?

Breaks when a directory exists without git subtree

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.

aurpublish/aurpublish.in

Lines 142 to 148 in 11aeeaa

# test if prefix already exists
if is_package_in_git ${package}; then
git subtree split -P "${package}" --rejoin
git subtree pull -P "${package}" aur:${pkgbase}.git master -m "Merge subtree '${package}'"
else
git subtree add -P "${package}" aur:${package}.git master
fi

Can't is_package_in_git improve to check this too?

aurpublish/aurpublish.in

Lines 47 to 49 in 11aeeaa

is_package_in_git() {
git ls-tree -d --name-only HEAD | grep -qxF "${1}"
}

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.

Provide default .gitignore

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 sources in the AUR itself (maybe say that in a comment?).

pull doesn't work off the bat

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.

Impossible to start by pulling a package

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.

Publish the aurpublish tool to AUR

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 😝

[Enhancement] suppress prepare-commit-msg temporarily / permanent

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

pre-commit hook leaves changes in my staging area and working directory

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.

[Enhancement] command to remove package

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

remove git submodule before publish

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

[Bug] aurpublish refuses to push package with a patch file located online

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!

[Enhancement] reset package to upstream state

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

`aurpublish setup` doesn't effectively work when `global core.hooksPath` is set

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.

Segfault on publish

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.

Maintenence going forward

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.

[Question] Can this support PKGBUILDs from Arch packages?

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.