Search Criteria
Package Details: rwu 0.0.7-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/rwu.git (read-only, click to copy) |
---|---|
Package Base: | rwu |
Description: | Random Urdu words/phrases generator. |
Upstream URL: | https://www.techtum.dev/work-urw-220310.html |
Licenses: | MIT |
Submitter: | siphr |
Maintainer: | siphr |
Last Packager: | siphr |
Votes: | 0 |
Popularity: | 0.000000 |
First Submitted: | 2022-03-10 22:17 (UTC) |
Last Updated: | 2022-03-13 15:41 (UTC) |
Latest Comments
siphr commented on 2022-03-13 11:08 (UTC)
Thank you a821. You have been very helpful and this has been a great exercise gives me a bit of confidence with the AUR workflow. Yep the idea was to use one package as a learning platform and then replicate these fixes across all the past ones. Once again, thank you very much. I hope it wasn't very annoying :)
a821 commented on 2022-03-13 09:36 (UTC)
The PKGBUILD looks much better now, though there are some issues.
more important:
$pkgdir
and$scrdir
, otherwise it will break if the path contains spaces. for example use:cd "$srcdir/$pypkgname-$pkgver/pip/"
.sources=(git+https://github.com/...)
). You can theupdpkgsums
to update the checksums automatically.less important:
pypkgname
should be_pypkgname
. The reason it they could conflict with internalmakepkg
variables.$pkgver
insources
to simplify updates ("https://github.com/siphr/urw/archive/refs/tags/$pkgver.tar.gz"
)LICENSE
. You can use the last command I wrote in the previous comment (you need tocd
to the right path though).Regardless, you addressed the major concerns so I will cancel the deletion request.
Please don't forget to fix your other packages, I will check again in a couple of days :-)
siphr commented on 2022-03-13 01:10 (UTC)
Thanks for your help and patience @a821. I have made the following changes now:
pip or sudo pipreferences were removed. Source has been tagged and released. Consequently md5sum has been added.
AUR and GIT have been updated accordingly. Once you ok this ill fix the rest of the packages. Thanks very much.
a821 commented on 2022-03-12 11:03 (UTC)
Using
sudo
is dangerous not only because there could be malicious code, but an unintended bug can create havoc... If I seesudo
I would imagine it is malicious. (We could argue that in this particular case it's non-malicious, but it's not the point; the point is not to usesudo
, period).Unfortunately it is not possible to disable the package, though you could contact a TU via IRC so it can be deleted more quickly and you resubmit it again fixed.
Regarding the package name, you can call it whatever you want;
python-urw
was just a suggestion. If you want to call itrwu
, it's fine.The script
rwu
can be created inbuild()
as you do, the issue here is(sudo) pip install
which is wrong. Though don't usedate
as this would result in a non-reproducible package. See https://wiki.archlinux.org/title/Reproducible_buildsFor the script I think a simply use something similar as the
echo
command, so it would look something like this (the permissions are taken care byinstall(1)
)siphr commented on 2022-03-12 10:30 (UTC)
Thanks a821, I did do the sudo change last night as a temporary change because I was meaning to NOT install in the home directory as directed, but I thought about it overnight, and realised it was a bad change, not sure if it "dangerous" but its surely broken because the sudo-ness will only work if the user is a sudoer, otherwise I believe the package install would just fail.
So I was going to look at today to see if there is a way to temporarily disable the package or something of that sort while I fix it. I tried look for a way to delete the package myself yesterday as well while I make the changes but the only option I found was to disown it.
I do believe, the python-rwu name would imply that it's installed as a python package where as I want it to be an independent command be it a light shell over the python package.
The other packages I want to fix as well ofcourse, but I want to just learn the correct way to do it with this package first, and then iI'll go replicating the fix for all other packages.
The thing that I do not understand with your shared pkgbuild is that, THAT build is just going to install the python package and not the rwu as bash script command as it is currently structured.
I guess I need to find an example of how code implemented as a package in python/pip is exposed as an aur package. Just thinking out loud here.
a821 commented on 2022-03-12 09:58 (UTC)
You just made the package worst and actually quite dangerous. You should never use
sudo
in a PKGBUILD. No exceptions.There's a lot going wrong here:
pkgname
: Not sure why you decided to userwu
but OK. I see thaturw
is taken, but I would've chosenpython-urw
as it is available. If you do decide to change the name, you need to create and submit another PKGBUILD and let this package be removed.pkgver
: this should be 0.0.6 as I see in pypi page.pkgrel
: this is set to 1 usually and incremented if the PGKBUILD changes. See https://wiki.archlinux.org/title/PKGBUILD#pkgrelarch
: If there are no C extensions then it shouldany
in most cases.source
: You have no tags in the git repo, so please use pypi to download the sources, for example,https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
where_name=urw
(you can actually copy&paste). If you use git tags, then it should point to a tag, likehttps://github.com/user/repo/archive/refs/tags/$pkgdir.tar.gz
build()
: Completely wrong. This usually follows the same pattern which you can almost copy and paste from here: https://wiki.archlinux.org/title/Python_package_guidelines#setuptools_or_distutilspackage()
: same as above, but add the license at the end, see here: https://wiki.archlinux.org/title/PKGBUILD#licensesha256sums
or better instead ofmd5sums