Re: Django-hosted aurweb Proposal

2019-02-16 Thread Loui Chang
On Sat 16 Feb 2019 17:21 -0800, Kevin Morris wrote:
> The following is a proposal for a Django-hosted aurweb application. It is
> meant to be a drop-in replacement for aur.archlinux.org; effectively
> cloning its user interface and capabilities into a Python Django extension.
> 
> Following https://patchwork.archlinux.org/patch/1000/, I would like to put
> together a new aurweb.

I'm a bit confused. You wrote one patch and you want to rewrite the whole thing
now? I've seen this at least three times before with more or less fully
developed rewrites. They all failed. They were all written in Python
coincidentally.

> The current revamped version of archweb runs inside of a django server as a
> django extension (or app). I would like to do this same thing for `aurweb`.
> The new django `aurweb` shall support all of the current v1-6 capabilities
> that aurweb provides, as well as the front-end user website located at
> https://aur.archlinux.org.

archweb was already written in python for django more than 10 yrs ago.
I guess it may not have been an extension (or app), whatever that is.
I imagine the porting/migration if any would have been much more trivial than
a full rewrite.

> It shall be an exact clone from the user's perspective.

This is a very uncompelling reason to rewrite the whole thing.

> The major differences between maintaining a PHP vs Django server would be
> that the Django server would be:

Users don't care about any of your six bullet points.
 
> I would like to hear your thoughts on this. If approved, I would love to
> begin this project within the next few weeks.

Begin the project now and don't make it the same. Make it better.
Nobody is gonna approve vaporware.
Steal users from the AUR.
Convince people your system really is better.
Good luck.


Re: [aur-dev] Stop limiting the height of AUR comments?

2017-03-10 Thread Loui Chang via aur-dev
On Fri 10 Mar 2017 06:12 +, Radostin Stoyanov via aur-dev wrote:
> I like the idea of expanding the long comments and an easy solution
> using JQuery could be adding link or button:
> 
> Expand (on click) -> $(this).closest('p').css("max-height", "none");
> 
> Condense (on click) -> $(this).closest('p').css("max-height", "10em");
> 
> 
> I tested in the browser console with:
> 
> $($('.article-content')[0]).children('p').css("max-height", "none");
> 
> $($('.article-content')[0]).children('p').css("max-height", "10em");

Really all this fancy formatting should be done in a separate client interface.
I think that the AUR itself should remain as simple as possible.


Re: [aur-dev] Stop limiting the height of AUR comments?

2017-03-09 Thread Loui Chang via aur-dev
On Thu 09 Mar 2017 16:35 -0800, Bruno Pagani via aur-dev wrote:
> > At least for me, seeing only a small portion of the comment at a time makes
> > it much harder to fully grok, particularly when it comes to things like
> > logs, error messages, patches, etc.
> 
> Those should rather be pasted on pasting services though, but still…

I now believe that the AUR should have its own builtin pasting service for
patches, logs and other attachments. It will make for a more seamless
experience. I've come to despise when sites fetch resources from many other
domains.

> > Beyond that, try loading that AUR page on your phone, or try navigating the
> > comments with one of the browser plugins for vim-bindings. On my phone, it's
> > not obvious at first glance that the truncated comments are individually
> > scrollable.  I believe that multiple vertical scrollbars on a page is not a
> > great experience in any browser.
>
> Agree.

Yeah the long-comment scroll box is horrible. Bad idea.


Re: [aur-dev] [PATCH] Change "File Request" to be more explicit.

2015-11-23 Thread Loui Chang
On Mon 23 Nov 2015 13:38 -0500, Eli Schwartz wrote:
> Apparently it confuses some people, and there appears to be enough space
> in the Package Actions section anyway.
> 
> Fixes: 
> https://lists.archlinux.org/pipermail/aur-general/2015-November/031776.html
> 
> Because a 37-post flame war is fun. :rolleyes:

I -strongly- believe the colour should be chartreuse!


Re: [aur-dev] [PATCH] Track providers in the official repositories

2015-10-22 Thread Loui Chang
On Wed 21 Oct 2015 19:50 -0400, Eli Schwartz wrote:
> On Wed, Oct 21, 2015 at 7:20 PM, Loui Chang <louipc@gmail.com> wrote:
> 
> > On Wed 21 Oct 2015 22:06 +0200, Lukas Fleischer wrote:
> > >
> > > Fixes FS#46549.
> > >
> > > Signed-off-by: Lukas Fleischer <lfleisc...@archlinux.org>
> >
> > I was thinking.. why not add the full url of the bug report?
> > That will make it a little easier to find.
> 
> On https://projects.archlinux.org/ that automatically gets rendered as a
> link. :)

Fancy. Would be nice to have on all interfaces though.


Re: [aur-dev] [PATCH] Track providers in the official repositories

2015-10-21 Thread Loui Chang
On Wed 21 Oct 2015 22:06 +0200, Lukas Fleischer wrote:
> 
> Fixes FS#46549.
> 
> Signed-off-by: Lukas Fleischer 

I was thinking.. why not add the full url of the bug report?
That will make it a little easier to find.


Re: [aur-dev] Setting keywords from the command line

2015-10-16 Thread Loui Chang
On Thu 01 Oct 2015 00:17 +0200, Marcel Korpel wrote:
> * Lukas Fleischer  (Tue, 29 Sep 2015 08:40:20
> +0200):
> > Currently, in order to change the keywords of a package base, users
> > need to log into the web interface and submit a form on the package
> > base details page. It would be nice to be able to change keywords
> > without using a web browser, see FS#45627 [1].
> 
> Sounds good to add a method to change keywords without using a web
> browser.
> 
> > 1. Add a set-keywords command to the aurweb SSH interface such that
> >users can run `ssh aur.archlinux.org set-keywords foobar keyword1
> >keyword2 keyword3` to change keywords (or still use the web
> >interface).
> > 
> > 2. Remove the option from the web interface and introduce a new file
> >(.KEYWORDS or something more general like .AURINFO, .AURMETADATA)
> >that is parsed in the Git update hook.
> 
> I strongly prefer 1. 2 causes too much clutter in the source tree and
> I don't like having AUR-specific files around, especially not if it's
> (only) for keywords. That would be another file we have to parse (if
> it's not as simple as lines with keywords or a line with keywords
> separated by spaces). And what if we invent another AUR-specific
> option? Another file? Change the syntax of the keywords file?
> 
> In case of 1, a command like `get-keywords` would also be necessary, so
> one can see what the current keywords are.

3. Make keywords part of the PKGBUILD spec, the metadata is then output to
   PKGINFO/SRCINFO


Re: [aur-dev] [PATCH] Let the user verify their email address

2015-08-17 Thread Loui Chang
On Mon 17 Aug 2015 09:53 +0200, Marcel Korpel wrote:
 I'm more in favour of a message only, entering email addresses twice is
 a nuisance and if you can copy-paste the data, it doesn't serve a
 purpose other then to frustrate a user (I fear lots of people don't
 understand the meaning of the same field twice).
 
 Instead showing a notice seems better to me, though it doesn't look
 that nice: https://ptpb.pw/em7S.png

Looks good to me.


Re: [aur-dev] [PATCH] Let the user verify their email address

2015-08-16 Thread Loui Chang
On Sun 16 Aug 2015 19:24 -0400, Eli Schwartz wrote:
 On Sun, Aug 16, 2015 at 7:04 PM, Marcel Korpel marcel.kor...@gmail.com
 wrote:
 
  * Patrick Burroughs (Celti) ce...@celti.name (Sun, 16 Aug 2015
  15:59:38 -0700):
   On Mon, 17 Aug 2015 00:54:54 +0200
   Marcel Korpel marcel.kor...@gmail.com wrote:
  
   On registering and updating an email address, the user has to type
   their email address twice. Do not allow autocomplete and pasting in
   the verification field.
  
   Please, do NOT forbid pasting in any field! Some of us (many,
   perhaps?) use information managers for passwords, usernames, and
   emails that paste or type such things in for us, specifically so that
   we do not get things wrong typing them in ourselves.
 
  I completely understand your frustration, I really hate it, too, but to
  let someone confirm their email address allowing copy-pasting would
  make the check useless. Then we can just drop this patch and live with
  FS#45792.
 
  Any thoughts on this?
 
 As far as I am concerned, do whatever you want. Lastpass overrides the
 autocomplete=off setting, anyway.

I'd prefer not to add ugly javascript hacks that only work in one or another
browser that only serves to babysit users.


Re: [aur-dev] [PATCH] FS#45834 - Remove trailing slash from git https://link.git/

2015-08-14 Thread Loui Chang
On Fri 14 Aug 2015 11:47 +0200, Johannes Löthberg wrote:
 On 14/08, Stefan Auditor wrote:
 Any reason not to remove the trailing slash?
 In my eyes it looks odd to have one after a file extension.
 
 It's not a file extension, it's just the suffix of a directory.

huh


Re: [aur-dev] AUR 4 and licensing

2015-04-13 Thread Loui Chang
On Mon 13 Apr 2015 12:46 -0230, David Manouchehri wrote:
  I like this idea, but I don't think it's sound to consider something
  GPL-licensed because the author checked a box or accepted the TOC. I doubt
  that has any legal significance.
 
 I agree that accepting a one time ToS agreement is hardly binding. That's
 why I suggested printing out a message with a Git hook saying everything
 you push is going to be GPL, it's a bit harder to claim ignorance when you
 see that message every time.
 
 We're already in the gray area since there's thousands of packages with no
 license explicitly listed, and I don't think it's sane to suggest removing
 those.
 
  Wouldn't it make more sense to use a mandatory two-line header like below?
 
 This switch to Git is already going to cost us a lot of maintainers who
 simply don't feel like learning it, I can't say I'm in favor for imposing
 any more requirements.
 
 I'm also not really a fan of littering my PKGBUILDs with static text
 either. Listing the current maintainer and contributors is already less
 than ideal (with the move to Git, I guess we could stop listing the
 contributors inline since they're in the logs).

I don't really like the idea of all this red-tape, requiring one license or
another. So I have some concerns. Is there a plan to enforce this? If the
PKGBUILD is trivial can you reasonably defend a license? If you want a license
why not allow the contributor to select one rather than choosing for them?

If I write a patch/etc is it under GPL or is it under the project's original
license?

So I'm thinking any license of the build scripts should be compatible with
the software it is packaging, or at least not impose any new restrictions.

Allow the contributor to select a 'do what you want' type 'license' which can
be used as a default if the package has a non recognisable license or multiple
licenses. Otherwise let the contributor specify the license.

Get rid of the TOS. I don't think the TUs want to become the license police.
Furthermore this is a topic that most likely should be discussed and decided
among TUs in a formal fashion.


Re: [aur-dev] yaourt search filtering

2015-02-08 Thread Loui Chang
On Sun 08 Feb 2015 12:26 -0600, Doug Newgard wrote:
 On Sun, 8 Feb 2015 11:02:47 -0500 (EST)
 Jude DaShiell jdash...@shellworld.net wrote:
 
  Can something be put into a yaourt search such that outdated packages 
  either are hidden or are shown under a group heading of outdated
  packages?
 
 This is the wrong list. Yaourt is a completely separate project by a
 totally different group of people. You can find the information on
 Github.

Oh yes. If you aren't doing development this list is not for you.
I thought it was a question about the RPC.


Re: [aur-dev] Renaming the AUR

2015-01-29 Thread Loui Chang
On Thu 29 Jan 2015 09:37 +0100, Lukas Fleischer wrote:
 Currently, we use the term AUR for both the collection of
 user-supplied source packages and the software that helps with accessing
 and modifying these packages which causes quite some misunderstandings.
 Earlier, it was suggested to use [unsupported] for the collection of
 packages and AUR for the software but I don't really like that
 terminology (makes the source package repository look like a repository
 of binary packages and calls the software repository).
 
 Here is what I suggest: Keep using the term AUR for the collection of
 packages and rename the software to aurweb (borrowing from archweb).
 
 What would need to be changed:
 
 * The name of the aur.git repository would become aurweb.git.
 
 * Several references in the AUR(web) source code need to be fixed, the
   header will still refer to the Arch User Repository.
 
 * Some uses of AUR in the Arch wiki need to be brought in line with
   the new terminology.

Makes sense to rename the software itself to help differentiate.
Traditionally, the AUR meant the community repo and [unsupported]
together and that was reflected in the web interface. People could still
comment and vote on community packages back then.


Re: [aur-dev] Introduction and proposal

2012-08-01 Thread Loui Chang
On Sat 28 Jul 2012 23:03 +0200, Mario Mueller wrote:
 Now that's the kind of feedback I like ;). Challenge accepted.
 
 May I kindly ask if you are willing to discuss any ideas I will offer?

Sure. As long as you start bottom-posting.
Also try not to get too caught up in discussion. There's a time for
discussion and there's a time to Just do it.



Re: [aur-dev] Introduction and proposal

2012-07-28 Thread Loui Chang
On Sat 28 Jul 2012 10:00 +0200, Mario Mueller wrote:
 I'm a bit sad to see, that nobody seems to be interested in my contribution
 proposal. No feedback, no support. I mean, I did not expect you to welcome
 me with arms wide open, but a response to my proposal would be a minimum
 sign of respect. I wonder if you really want to change something or just
 want to leave it as it is? Maybe I just got wrong info? If do not want my
 help, just tell me and I will find another open-source project to
 contribute to.

I see no compelling reason to redo years of work under another
language/framework just for that sake alone. I think people would like
to see some better reasons for this.

Back before I got involved with the AUR there was a Brazilian project
that was trying to do the same thing as you. And later there was another
project 'AUR2' [1] that also had a similar goal.

If you're going to rewrite the AUR I think you really need to offer
something that the current AUR can't offer from a user perspective.
You need to offer a paradigm shift, otherwise it's hard to entice
people to an unestablished and unproven codebase.

For example, aur3 [2] (another independent project) is an interesting
take on the AUR.

Making the AUR into 'yet-another-webapp-but-in-shiny-python' just isn't
interesting enough. We could rewrite CVS, but in shiny python but that
wouldn't be really interesting either. So, I'm glad git (and other dvcs)
came along.

Don't get me wrong. I'm not trying to discourage your contribution. Just
trying to help you think outside the box.

Cheers.

[1] https://wiki.archlinux.org/index.php/AUR_2
[2] http://aur3.org/



Re: [aur-dev] [PATCH] Wrap comments in pre tags, fixes FS#14391

2011-06-29 Thread Loui Chang
On Wed 29 Jun 2011 16:23 -0500, Dan McGee wrote:
 On Wednesday, June 29, 2011, Manuel Tortosa manutort...@gmail.com wrote:
  Exactly this, wrap the comments in pre tags allowing patches or at least
  better build output formatting.
 
 -1, and I believe this isn't the first time this has been proposed. It
 makes everything else less readable at the expense of a few comments.
 
 Why not have a checkbox when entering a comment that allows you to
 mark it as code/fixed width? That way we don't screw of every existing
 package comment.

Brilliant Idea. Haha. Why didn't I think of that?
I don't like patches and stuff in comments though.



Re: [aur-dev] AUR new package notification

2011-04-12 Thread Loui Chang
On Tue 12 Apr 2011 15:16 +0200, Lukas Fleischer wrote:
 I'm not subscribed to new package notifications but it seems like AUR
 this feature has been disabled for a while now. At least, I did neither
 find a cronjob running newpackage-notify nor the tupkgs.conf
 configuration file that is required to run this script. Browsing the
 aur-dev archives, I also found a mail [1] from 2008 reporting that the
 cronjob was obviously disabled.
 
 Do we still need this at all?
 
 Given that there were no complaints for more than two years and that
 there's a RSS feed [2] for new packages, I'd say we can drop the
 notification script as well as the field on the account page.
 
 Objections?
 
 [1] http://mailman.archlinux.org/pipermail/aur-dev/2008-June/000323.html
 [2] https://aur.archlinux.org/rss.php

Yeah I would kill, or alter anything that requires tupkgs. That was
based on the old scripts that TUs used before switching to devtools.



Re: [aur-dev] Using gettext for translations?

2011-04-07 Thread Loui Chang
On Thu 07 Apr 2011 04:27 +0200, Lukas Fleischer wrote:
 On Wed, Apr 06, 2011 at 10:26:35PM +0200, Lukas Fleischer wrote:
  I thought about this sometime ago. The existing i8n files shouldn't be
  too hard to convert and we could move translation work to some more
  appropriate platform like Transifex which is used by pacman already. PHP
  gettext integration doesn't seem to be too bad and our PHP is compiled
  with gettext support by default, also.
  
  Any opinions/objections?
 
 Pushed a first draft to my wip branch. There still is a bunch of hacky
 stuff that needs to the reviewed or fixed. This should rather be
 considered as some code to play around with.
 
 Patches welcome.

Awesome. I had thought about using gettext for translations, but it
looked to complicated for me at the time. Hehe. I'm glad you could
figure it out.



Re: [aur-dev] AUR 1.8.0 released

2011-02-20 Thread Loui Chang
On Sun 20 Feb 2011 19:21 +0100, Lukas Fleischer wrote:
 1.8.0 is finally out [1]!
...
 * Fixes for all bugs reported on the bug tracker [2] :)

Hell yeah! Awesome work.



Re: [aur-dev] Package blacklist for the AUR

2011-02-08 Thread Loui Chang
On Mon 07 Feb 2011 18:56 +0100, Lukas Fleischer wrote:
 On Mon, Feb 07, 2011 at 06:50:14PM +0100, Lukas Fleischer wrote:
   Blacklist helper side:
   * I won't lie, I think this is over-engineered a tad. This can be done
   in a much shorter and easier to hack shell script since all you need
   is package names- just pipe bsdtar output through some magic and you
   have package names. I've attached a sample starter script I use for
   archweb updates. I'd probably have it call bsdtar and then who knows
   what.
  
  Our consensus was not to fetch tarballs via HTTP and extract them here,
  but use libalpm instead. We already discussed using a small PHP script
  that uses Archive::Tar (PEAR) but discarded that. Using libalpm, future
  database format changes won't affect us and it just seems cleaner.
  
  Of course, we could do that with some shell script which would have to
  do following things tho:
  
  - parse the AUR config.inc file: read MySQL host name, socket, user
name, password
  - use pacman(8) to sync local databases
  - convert packages to MySQL queries using some sed(1)/awk(1) magic
  - pipe stuff to mysql(1), ensure no errors occurred
  
  I just think that it wouldn't be much shorter (that C helper has about
  100 SLOC if you strip all that error handling stuff), nor cleaner, nor
  faster. Best thing would to have PHP bindings for libalpm here... Well.
  Recommendations and patches welcome :p
 
 Oh, and I'll probably make this script add package names listed in
 packages' provides arrays to the blacklist as well (thanks to Justin
 Davis, just read his reply).

Awesome :D.
Rather than creating another config file, would it be possible to just
point to the AUR's config.inc? Maybe a PHP wrapper around aurblup...

Kind of like the cleanup script? (That script should probably be changed
to point directly to the config file.)

Also I found a couple typos: something about dwm, and leightweight.

Thanks Lukas, you're the new hero of the AUR. :D



Re: [aur-dev] Old, unapplied patches

2011-02-08 Thread Loui Chang
On Tue 08 Feb 2011 19:42 +0100, PyroPeter wrote:
 On 02/07/2011 02:36 PM, PyroPeter wrote:
 Hello AUR developers,
 
 there is a great backlog of patches that work well, but are not applied.
 
 Among them are:
 * The right-to-left fixes for the hebrew translation
 * Making links in comments clickable
 * Deletion through the web interface
 
 It would be great if you could take some time to review and apply them.

 It's a pity nobody even bothers to reply to this topic.
 Obviously there is no point in contributing to the AUR if the
 contribution is just ignored.

Well, I have to apologise for this. I sat on these patches for far too
long and I couldn't find the time or interest to apply them. I do really
appreciate the community members' contributions. We finally have someone
new (Lukas) that has taken the initiative to maintain and develop the
AUR, so hopefully we can see more of these contributions being applied
if I'm not able to.



Re: [aur-dev] Question about sanitized data dumps

2011-02-08 Thread Loui Chang
On Fri 04 Feb 2011 18:03 -0800, elij wrote:
 On Fri, Feb 4, 2011 at 3:29 PM, Loui Chang louipc@gmail.com wrote:
  Nothing has been set up yet, it's just something I had been thinking
  about. I think it could encourage more development. Yeah we would
  definitely have to sanitize the data. Providing the source packages via
  rsync or something would be the first step. I'm not too sure about MySQL
  data yet though.
 
 I see.
 Well if anything ever does develop in that regard, please send a copy my way!
 :)

Indeed!



Re: [aur-dev] [PATCH] Use VARCHAR instead of CHAR where appropriate.

2011-02-08 Thread Loui Chang
On Tue 08 Feb 2011 10:40 +0100, Lukas Fleischer wrote:
 - LangPreference CHAR(5) NOT NULL DEFAULT 'en',

I think LangPreference could probably remain at CHAR, but I am no i18n
or DB whiz.



Re: [aur-dev] Question about sanitized data dumps

2011-02-04 Thread Loui Chang
On Sun 30 Jan 2011 13:54 -0800, elij wrote:
 I have been [fooling around][1] with an aur-rpc reimplementation in
 ruby+redis with sphinx as the search engine.
 
 Loui [mentioned][2] he had been thinking about providing a dump of the
 existing database or something, to users who are interested in
 developing features and/or replacements.
 
 If so, and assuming the dump is sanitized in some way (remove real
 user email addresses, etc), I would certainly be interested. It would
 be nice to get some real data to play with.
 
 Is there any more information currently available on this?

Nothing has been set up yet, it's just something I had been thinking
about. I think it could encourage more development. Yeah we would
definitely have to sanitize the data. Providing the source packages via
rsync or something would be the first step. I'm not too sure about MySQL
data yet though.

 Thanks.

Thanks for your continued interest Eliott!

 [1]: https://github.com/cactus/spew-ruby
 [2]: 
 http://mailman.archlinux.org/pipermail/aur-general/2011-January/013323.html


Re: [aur-dev] Checking packages names against official repos in the AUR when uploading

2010-12-18 Thread Loui Chang
On Thu 16 Dec 2010 10:35 +0100, Lukas Fleischer wrote:
 Hi, Loui!
 
 I'm recently having a look at FS#12902 [1]. It's about comparing names
 to the official repo databases when uploading a package. I think that
 would be really easy to implement if we have an additional directory
 where we put repo databases and keep them in sync using a `pacman -Sy`
 cronjob or something similar. Parsing the databases is very easy using
 Archive_Tar (which we already use anyways) as well. Only thing I don't
 like about that is the delay caused by mirrors and the cronjob which
 will be a problem if we decide to move a package from the official repos
 to [unsupported].
 
 What do you think about that? Should we implement this at all? :)
 
 [1] https://bugs.archlinux.org/task/12902

Hello Mr Fleischer!

Yeah I think it should be implemented.

We can check the local sync database (or point it to any arbitrary
pacman database in config.inc) and create dummy entries for packages
that are already in the binary repos. To get around the problem of
moving packages to [unsupported] we can make the upload restriction
exempt for Trusted Users, since they'll probably be the ones moving the
packages and should be trusted to check the binary repos before
submitting to the AUR.

You should send this to the mailing list too! CCd

Cheers.



Re: [aur-dev] adding german translation

2010-12-04 Thread Loui Chang
On Sat 04 Dec 2010 22:37 +, Viktor Leonhardt wrote:
 From 22454f5d4c2815549d93dc909a84b15aee46b8f4 Mon Sep 17 00:00:00 2001
 From: Viktor Leonhardt leonh...@unix-ag.uni-kl.de
 Date: Sat, 4 Dec 2010 22:34:53 +
 Subject: [PATCH] Added german translation
 
 ---
 +$_t[Some packages may be provided as binaries in [community].] = Manche 
 Pakete k??nnten als Bin??r-Pakete in [community] bereitgestellt sein.;
 +

Thanks for the update Viktor.



Re: [aur-dev] [PATCH] FS#3542 - auto redirect from confirmation screens

2010-11-21 Thread Loui Chang
On Mon 20 Sep 2010 15:17 +0200, Dan Vrátil wrote:
 
 On Tue, 17 Aug 2010 06:43:06 -0400, Loui Chang louipc@gmail.com
 wrote:
  On Mon 16 Aug 2010 18:50 +0200, Dan Vratil wrote:
  On Saturday 31 July 2010 21:47:29 Dan Vratil wrote:
   So here comes another revision :-)
 
  I'm just curious about state of the patch? Is it OK or do I have to
  make any changes?
  
  Ah sorry I must have missed it. I'll have to let you know later.
 
 Hi, I'm just reminding the patch, you probably forgot about it :)
 
 The mail with patches is here:
 http://mailman.archlinux.org/pipermail/aur-dev/2010-July/001130.html

Alright! It's finally submitted, with a couple of fixes.
Thanks again.



Re: [aur-dev] [PATCH] Add timestamp when a package is flagged out-of-date (FS#20848).

2010-11-21 Thread Loui Chang
On Sun 10 Oct 2010 20:09 +0200, Lukas Fleischer wrote:
 On Thu, Oct 07, 2010 at 11:09:36PM -0400, Loui Chang wrote:
  This:
   + echo br /span class='f6'.__(This package has 
   been flagged out of date). (.$out_of_date_time.)/span;
  
  Could change to this:
   + echo br /span class='f6'.__(This package has 
   been flagged out of date.). ($out_of_date_time)/span;
 
 Well, it's just a cosmetic change. Having the date in brackets after a
 punctuation mark looked ugly to me, so I removed the period everywhere.
 If you want me to keep the patch simple and don't care about the period,
 I can revert this change and send another patch.

Just pushed without the i18n stuff. Thanks.



Re: [aur-dev] TRANSLATION: zh_CN updated

2010-10-09 Thread Loui Chang
On Fri 08 Oct 2010 05:18 +, gDD wrote:
 Thanks! And about php code patch, I'd love to learn php first...:)

Hehe. Sounds like you're almost there with a LAMP setup and searching
the source for new strings. :)

 On 08/10/2010, Loui Chang louipc@gmail.com wrote:
  On Wed, Oct 6, 2010 at 10:50 AM, Mod Gao mod@gmail.com wrote:
   Hi, this is updated zh_CN translation, many strings changed and
   some string leave un-translated since last time, so today i think
   it's time to update it:)
   I tested with localhost:80 LAMP and everything seems perfect.
  
   and there is a problem:
   the Bad username or password. string in web/lib/acctfuncs.inc
   don't got translated.

Just caught this right now. Thanks again.

  If you see any problems with strings not being passed to the
  translation function, or excess whitespace please feel free to send
  patches for those. Thanks for the update gDD!


Re: [aur-dev] TRANSLATION: zh_CN updated

2010-10-07 Thread Loui Chang
On Wed 06 Oct 2010 10:53 +, I'm gDD wrote:
 Yes, now this email maintain zh_CN.po
 
 On Wed, Oct 6, 2010 at 10:50 AM, Mod Gao mod@gmail.com wrote:
  Hi, this is updated zh_CN translation, many strings changed and some string
  leave un-translated since last time, so today i think it's time to update
  it:)
  I tested with localhost:80 LAMP and everything seems perfect.
 
  and there is a problem:
  the Bad username or password. string in web/lib/acctfuncs.inc don't got
  translated.
 
  and i changed my e-mail address to usrgdd (b) gmail, so i changed it in
  translation file also, just as proof:)
 
  attachment is git patch.

If you see any problems with strings not being passed to the
translation function, or excess whitespace please feel free to send
patches for those. Thanks for the update gDD!



Re: [aur-dev] [PATCH] Move deletion proposal code from pkgfuncs.inc to pkgedit.php and add mechanism for dealing with reasons for deletion.

2010-10-07 Thread Loui Chang
On Sun 26 Sep 2010 21:46 +0100, Peter Lewis wrote:
 ---
  web/html/pkgedit.php |  210 
 ++
  web/lib/pkgfuncs.inc |   42 ++
  2 files changed, 218 insertions(+), 34 deletions(-)

Just a quick note:
There is a patch in my queue which removes all current code out of
pkgedit, which is something that I've been meaning to do.

I'd recommend altering the mechanism so that it doesn't reside in
pkgedit. Thanks Peter.



Re: [aur-dev] [PATCH] Add timestamp when a package is flagged out-of-date (FS#20848).

2010-10-05 Thread Loui Chang
On Tue 05 Oct 2010 14:06 +0200, Lukas Fleischer wrote:
 On Sun, Oct 03, 2010 at 01:35:45PM -0500, Dan McGee wrote:
  On Sun, Oct 3, 2010 at 1:34 PM, Lukas Fleischer
  archli...@cryptocrack.de wrote:
   I basically agree and I already changed the patch to only the
   OutOfDateTS column only. The only thing that I'm not sure how to
   implement is the migration code, notably the default timestamp to use
   for packages that are flagged out-of-date when upgrading.
  
   Which is the best value to choose? Zero? UNIX_TIMESTAMP()?
  
  Current time is probably the best idea. I also have no idea why this
  isn't just a datetime column.
 
 It isn't a DATETIME cause I just copy/pasted the ModifiedTS column.
 
 Loui, is there any reason for using BIGINTs instead of DATETIMEs for
 timestamps?

Not that I know of. It's a legacy of whoever designed the database in
the beginning. Generally I haven't touched anything that works because
I'm still learning PHP and SQL as needed to fix bugs.



Re: [aur-dev] [PATCH] FS#3542 - auto redirect from confirmation screens

2010-10-03 Thread Loui Chang
On Mon 20 Sep 2010 15:17 +0200, Dan Vrátil wrote:
 
 On Tue, 17 Aug 2010 06:43:06 -0400, Loui Chang louipc@gmail.com
 wrote:
  On Mon 16 Aug 2010 18:50 +0200, Dan Vratil wrote:
  On Saturday 31 July 2010 21:47:29 Dan Vratil wrote:
   So here comes another revision :-)
 
  I'm just curious about state of the patch? Is it OK or do I have to
  make any changes?
  
  Ah sorry I must have missed it. I'll have to let you know later.
 
 Hi, I'm just reminding the patch, you probably forgot about it :)
 
 The mail with patches is here:
 http://mailman.archlinux.org/pipermail/aur-dev/2010-July/001130.html

Thanks for the reminder. It is in my queue now.



Re: [aur-dev] [PATCH] Fix headers in pkg_search_results.php

2010-10-03 Thread Loui Chang
On Wed 29 Sep 2010 14:39 +0200, Manuel Tortosa wrote:
 This patch fix this issue in the table headers:
 
 CategoryName   VotesDescription
 
 centering Name and Description columns headers, fix the issue.

Nice one. Thanks.



Re: [aur-dev] [PATCH] Add smilies to comments

2010-10-03 Thread Loui Chang
On Sun 03 Oct 2010 12:30 +0200, Manuel Tortosa wrote:
 The images you can get them from here:
 wget www.chakra-project.org/temp/manutortosa/smilies.tar.gz
 or use your own, those are licemsed under gpl2 and are exactly the same
 you've in your forums.

I'm not really big on eyecandy to be honest.
I prefer really simple clean interfaces.

I would like to hear more feedback about this.
Maybe stick this in the AUR bug tracker to collect votes.



Re: [aur-dev] Hello all

2010-10-03 Thread Loui Chang
On Mon 27 Sep 2010 18:12 +0200, Manuel Tortosa wrote:
 http://gitorious.org/chakra-web/ccr

This URI no longer works.
Are you still hosting your git repo somewhere?
Thanks.



Re: [aur-dev] [PATCH] Cross-Site Scripting vulnerability

2010-10-02 Thread Loui Chang
On Sat 02 Oct 2010 16:56 +, Viktor Leonhardt wrote:
  Hello,
 While working on a better E-mail validation, i found some cross-site
 vulnerabilities
 in the lib/accfuncs.inc. Here is the Patch, witch is fixing this
 problem. I hope, that i found
 all relevant parts, because I'm not so familiar with this site. You
 can try it by your own
 by setting a user name or e-mail with a single quote. Like:
 
 foo'scriptalert('XSS');/script
 
 I will soon commit a patch for the E-mail validation using this website[1].
 The most is working, except an problem with the double quotes.
 
 [1] http://www.linuxjournal.com/article/9585
 
 greetings Viktor

 From eaea9a4d11c1cd2740079864d28d9a10329fe849 Mon Sep 17 00:00:00 2001
 From: Viktor Leonhardt leonh...@unix-ag.uni-kl.de
 Date: Sat, 2 Oct 2010 16:47:52 +
 Subject: [PATCH] Fixing XSS vulnerability
 
 ---
  web/lib/acctfuncs.inc |   30 +++---
  1 files changed, 15 insertions(+), 15 deletions(-)

Wow I thought that was fixed a long time ago. Thanks.



Re: [aur-dev] [PATCH] Add timestamp when a package is flagged out-of-date (FS#20848).

2010-10-02 Thread Loui Chang
On Fri 01 Oct 2010 21:41 -0500, Dan McGee wrote:
 On Fri, Oct 1, 2010 at 9:39 PM, Loui Chang louipc@gmail.com wrote:
  On Thu 30 Sep 2010 18:19 +0200, Lukas Fleischer wrote:
  I was thinking - could we just change things so that OutOfDateTS is the
  sole indicator of whether a package has been flagged or not?
 
  If it's set, then it's out of date.
  If it's zero or null, then it's up to date.
 
  This might also apply to deletion, or orphan requests.
  Really all these types of flagging could share the same structure and
  code as far as I can envision it.

 I made this exact change to the archweb code a while back; this is a
 great usage of a nullable column.
 http://projects.archlinux.org/archweb.git/diff/?id=edfdc2id2=845838

Yep. It makes sense to me.

 Skip over the new migrations code (main/migrations/*.py); and look at
 the other changes if you are curious.

Wow that migrations code is crazy.
I just added a text file that people can read and manually update their
database.



Re: [aur-dev] [PATCH] Make external links in comments clickable (FS#20137).

2010-10-02 Thread Loui Chang
On Fri 01 Oct 2010 01:05 +0200, Lukas Fleischer wrote:
 On Thu, Sep 30, 2010 at 08:56:56PM +0200, PyroPeter wrote:
  You can also link to a homepage using valid URL's. The additional
  feature may be nice, but makes the code more complex. It also
  trains users to omit the http://; and produces more work for devs,
  as they all now have to parse this invalid hostname+path stuff.
 
 Hm, that's a question of taste. We'll let Loui decide :p

I generally agree with that.



Re: [aur-dev] [PATCH] Geshi AUR implementation

2010-10-01 Thread Loui Chang
On Thu 30 Sep 2010 20:13 +0200, Lukas Fleischer wrote:
 On Wed, Sep 29, 2010 at 03:35:24PM +0200, Manuel Tortosa wrote:
   This introduces a remote file inclusion vulnerability allowing an
   attacker to read arbitrary files since $pkgbuild is not validated
   before passing it to file_get_contents().
   
   Don't apply this patch until everything is fixed, please.
  Thanks for your suggestions, i added them all to CCR ;)
 
 Btw, this is still not fixed! Have a look at [1].
 
 You should consider using basename(), realpath() and/or regexp to check
 the PKGBUILD path. Also check [2], [3].
 
 [1]
 http://mailman.archlinux.org/pipermail/aur-dev/2010-September/001268.html
 [2] http://www.madirish.net/?article=427
 [3] http://www.acunetix.com/websitesecurity/php-security-3.htm

Thanks for helping review these patches Lukas.
It's much appreciated.



Re: [aur-dev] [PATCH] Minor fix in French translation (FS#20111).

2010-10-01 Thread Loui Chang
On Thu 30 Sep 2010 17:42 +0200, Lukas Fleischer wrote:
 ---
  web/lang/fr.po |8 
  1 files changed, 4 insertions(+), 4 deletions(-)

...

  $_t[Search Criteria] = Critères de recherche;

I decided to close that bug as won't implement.

Also I notice that you're sending your mails as charset=iso-8859-1 not
utf-8, which is causing problems with the encodings. Please check your
mail client settings.

You might also gzip patches if you can't send in the correct encoding.

Cheers.



Re: [aur-dev] [PATCH] Add timestamp when a package is flagged out-of-date (FS#20848).

2010-10-01 Thread Loui Chang
On Thu 30 Sep 2010 18:19 +0200, Lukas Fleischer wrote:
 ---
  UPGRADING |4 
  support/schema/aur-schema.sql |1 +
  web/lang/cs.po|2 +-
  web/lang/de.po|2 +-
  web/lang/el_GR.po |2 +-
  web/lang/fr.po|2 +-
  web/lang/he.po|2 +-
  web/lang/hr.po|2 +-
  web/lang/hu.po|2 +-
  web/lang/it.po|2 +-
  web/lang/nb_NO.po |2 +-
  web/lang/pl.po|2 +-
  web/lang/ro.po|2 +-
  web/lang/ru.po|2 +-
  web/lang/sr.po|2 +-
  web/lang/tr.po|2 +-
  web/lang/uk.po|2 +-
  web/lang/zh_CN.po |2 +-
  web/lib/pkgfuncs.inc  |3 ++-
  web/template/pkg_details.php  |3 ++-
  20 files changed, 25 insertions(+), 18 deletions(-)
 
 diff --git a/UPGRADING b/UPGRADING
 index 743f404..99c5d1a 100644
 --- a/UPGRADING
 +++ b/UPGRADING
 @@ -1,6 +1,10 @@
  Upgrading
  =
  
 +From 1.7.0
 +--
 +ALTER TABLE Packages ADD OutOfDateTS BIGINT UNSIGNED NOT NULL;
 +
  From 1.6.0 to 1.7.0
  ---
  ALTER TABLE Users ADD Salt CHAR(32) NOT NULL DEFAULT '';
 diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql
 index 250d405..15705a3 100644
 --- a/support/schema/aur-schema.sql
 +++ b/support/schema/aur-schema.sql
 @@ -120,6 +120,7 @@ CREATE TABLE Packages (
   LocationID TINYINT UNSIGNED NOT NULL DEFAULT 1,
   NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0,
   OutOfDate TINYINT UNSIGNED DEFAULT 0,
 + OutOfDateTS BIGINT UNSIGNED NOT NULL,
   SubmittedTS BIGINT UNSIGNED NOT NULL,
   ModifiedTS BIGINT UNSIGNED NOT NULL,
   SubmitterUID INTEGER UNSIGNED NOT NULL DEFAULT 0, -- who submitted 
 it?

I was thinking - could we just change things so that OutOfDateTS is the
sole indicator of whether a package has been flagged or not?

If it's set, then it's out of date.
If it's zero or null, then it's up to date.

This might also apply to deletion, or orphan requests.
Really all these types of flagging could share the same structure and
code as far as I can envision it.

Also, I think that all these translation changes are really unnecessary.



Re: [aur-dev] [PATCH] Convert logout and forgot password to buttons

2010-09-29 Thread Loui Chang
On Wed 29 Sep 2010 15:01 +0200, Lukas Fleischer wrote:
 On Wed, Sep 29, 2010 at 02:23:39PM +0200, Manuel Tortosa wrote:
  +   input type=button class=button value=?php  print 
  __(Logout); ? onclick=window.location.href='logout.php' 
  +   form
 i [...]
  +   input type=button class=button value=?php  print 
  __(Forgot Password); ? onclick=window.location.href='passreset.php' 
 
 This is not XHTML 1.0 Strict conform. And I'd really prefer something
 adequate that works without javascript (which is quite easy here).

Agreed. I am avoiding Javascript in the AUR so we can help ensure
functonality across all browsers.



Re: [aur-dev] [PATCH] Add PKGBUILD Syntax Highlighting

2010-09-29 Thread Loui Chang
On Wed 29 Sep 2010 17:38 +0200, PyroPeter wrote:
 On 09/29/2010 01:33 PM, Manuel Tortosa wrote:
 This patch adds pkgbuild syntax highlighting using geshi.
 
 Requisites: GeShi, the latest version the better, works with all versions
 
 http://sourceforge.net/projects/geshi/files/geshi/GeSHi%201.0.8.9/GeSHi-1.0.8.9.tar.gz/download
 
 You don't need the whole extension, just:
 
 geshi.php -  lib/geshi.php
 bash.php  -  lib/geshi/bash.php
 
 I found that link to the raw PKGBUILD very useful in some cases,
 so I would appreciate it if it was kept.
 (e.g. Tarball :: Files :: view PKGBUILD :: download PKGBUILD)

Well, the Tarball link is really what you should use to download the
build scripts.


Re: [aur-dev] [PATCH] Geshi AUR implementation

2010-09-29 Thread Loui Chang
On Wed 29 Sep 2010 13:38 +0200, Manuel Tortosa wrote:
 Sorry last patch i sent will not work in your implementation as we use /lib 
 instead of ../lib, this new one will work in your case.

 From 10ba3fa656bc4c59fc6d82f67dbed772e900dc47 Mon Sep 17 00:00:00 2001
 From: Manuel Tortosa manutort...@gmail.com
 Date: Wed, 29 Sep 2010 13:28:49 +0200
 Subject: [PATCH 2/2] Add PKGBUILD syntax highligh with GeShi

Hmm. This fails if GeShi isn't installed.
Can you make it fallback to the previous behaviour thus making syntax
highlighting an optional feature?



Re: [aur-dev] small translation problem

2010-09-25 Thread Loui Chang
On Fri 24 Sep 2010 21:31 +0200, PyroPeter wrote:
 On 09/24/2010 06:47 PM, Stefan Husmann wrote:
 You got me wrong here, I guess. Paket hochladen is completely okay for
 a button with which you can upload a package. But if you want to make a
 comment and submit it, the button is also named Paket hochladen, and
 here you do not upload a package but a comment. My patch i just fixing that.
 
 Indeed, there seems to be a misunderstanding. (Probably caused by my
 limited English skills)
 
 My main point was the following: The AUR's translation system does not
 distinguish between upload-package and upload-comment. (In English,
 both buttons are labeled Submit.) This makes it hard to translate
 this buttons, as the German translation should use different labels
 for the two buttons.

Hmm. Are there any translation systems that do that?
If that's ever implemented it would be good to follow some kind of
standard. Generally I don't think it would be possible without changing
the text in the source.

I would say to just try and make the translation as close as possible
without getting too specific about the meaning. Also Abschicken is a
cool word.



Re: [aur-dev] Hello all

2010-09-24 Thread Loui Chang
On Fri 24 Sep 2010 02:31 +0200, Manuel Tortosa wrote:
 On Friday 24 September 2010 02:14:39 Loui Chang wrote:
  No. You should actually send patches to aur-dev@archlinux.org as
  git-formatted patches. Have a look at the HACKING file at the top of the
  source tree.
  
  Do you have a git repo with the code for CCR somewhere?
  We could possibly just manage patches across a couple of branches, and
  do fancy merging and all that fun stuff without the need to email
  patches around.
 
 lol sorry.. first patch already sent to the other ml :/ it was a bit
 big bcause it include the GeShi code needed. it's a 45kb tar.gz, with
 the patch, so i was waiting approval.

Hmm maybe something like that should be a feature that could be turned
on or off, and the admin can then just pull in the GeShi code
themselves if they need it. Of course you should reference the correct
version in the docs. I'm not sure that I'd want to pull in so much code
just for eyecandy.

 Must i send it to this list?

Yes you should send patches to this list.

 About the git repo - not yet
 
 The Ccr belongs to the new chakra webpage and it's not released yet so
 i keep it in the dark until the final release of the new template this
 weekend ;)
 
 Even more i'm following the work of Jan Mette and he never created a
 repo for the webpage development, the Ccr git will be online soon,
 maybe we can do some nice.

Well, I look forward to further developments. Thanks!



Re: [aur-dev] Hello all

2010-09-23 Thread Loui Chang
On Thu 23 Sep 2010 15:09 -0300, Ángel Velásquez wrote:
 2010/9/23 Manuel Tortosa manutort...@gmail.com:
  Hello all, i'm Manuel Tortosa, from the Chakra Project  and i work in the
  Chakra Webpage developement ( i'm the pacman Catalan translator :P )
 
  where  can i send these patches?
  All the paches will be prepared using the AUR source code and template
  agnostic to fit the ARCH look even if this means double work for me.
 
  Thanks a lot for your work. Keep Arch rolling!
 
 You should send your patches to aur-gene...@archlinux.org in git
 format then Loui or Callan could apply them :D

No. You should actually send patches to aur-dev@archlinux.org as
git-formatted patches. Have a look at the HACKING file at the top of the
source tree.

Do you have a git repo with the code for CCR somewhere?
We could possibly just manage patches across a couple of branches, and
do fancy merging and all that fun stuff without the need to email
patches around.

I'm happy to see that there's some use for the AUR code outside of Arch
Linux. :D

Cheers.



Re: [aur-dev] Handling deletion through the web interface.

2010-09-19 Thread Loui Chang
On Sat 11 Sep 2010 16:20 +0100, Peter Lewis wrote:
 As I said in my TU application, I want to get involved in trying to
 grease the wheels of the AUR a little. So, I'm proposing as a first
 step that we allow (prefer? require?) deletion requests to be handled
 through the web interface.

Hi Peter. Thanks for sending in these patches.
I really don't know when I'll be able to give these a fair look however.
The AUR really needs someone to step up to keep it going now.

I finally updated the AUR today, but I was actually meaning to do that
two months ago. :(



Re: [aur-dev] Status of the password recovery patch

2010-09-19 Thread Loui Chang
On Tue 07 Sep 2010 20:29 +0300, Duru Can Celasun wrote:
 11 months ago someone wrote a password recovery patch[1] for AUR and it got
 committed[2] into the git repo in a few weeks. Is there a reason why this is
 not pushed into the live site? What is the status of this patch?

Well, I've overcome my laziness and it should be functional now.
Enjoy! :D



Re: [aur-dev] Please update Greek language translation

2010-08-19 Thread Loui Chang
On Thu 12 Aug 2010 08:59 +0300, Panos Filip wrote:
 I've found new untranslated strings, and i've made new updates (NEW
 patch attached)
 
 And:
 1) The
 
 [Forgot Password] http://aur.louipc.mine.nu/passreset.php
 
 link, can you provide a string for that please ?
 
 2) In Search by, the only one that we have strings for it is: Maintainer
 
 For Name  Desc Name only  Submitter, I didn't find any string
 unfortunatelly :S

Ah these weren't even properly being accessed via the translation
function. I've pushed a fix for that. It would actually still work if
you included those strings in a translation file though.

 From 35166b245a2592b4b00d313ef6791bca615aa0c4 Mon Sep 17 00:00:00 2001
 From: Flamelab panosfi...@gmail.com
 Date: Thu, 12 Aug 2010 08:54:51 +0300
 Subject: [PATCH] Minor fixes in Greek translation

Thanks. That's been pushed.



Re: [aur-dev] Adding the HE language.

2010-08-15 Thread Loui Chang
On Mon 16 Aug 2010 01:53 +0200, PyroPeter wrote:
 Attached is a patch that adds Right-To-Left-support.
 
 From the commit message:
 This replaces most parts of pkg_search_results.php, as this file was the
 first one I looked at more closely that had great flaws:
 * The obscure page-number-generation-code was rewritten and moved to
   pkgfuncts.inc
   * There are no more Next and Previous buttons, imo they are
 redundant.
   * The links now cover the whole page range, not just the pages next
 to the current one.
 * The blind-table in the footer was replaced by floating divs to allow
   proper RTL-support.
 * The odd rows of the results-table are now made darker with means of
   CSS 3. Every arch-user's browser should support this.
 * The page is now valid HTML even if there are no results.
 * Removed all tdspanspancontent/span/span/td-like oddities.
   td is an inline element by itself, there is no need to place a
   span in there. Two of them make even less sense.
 * Removed reoccurring style-attributes. Adopted CSS to do the same.
 * Changed indention to something (imo) senseful.
   Indention is now done like in HTML; If there is an 'if' or 'for'
   in the PHP-code, the affected HTML-elements are also indented.
 
 If someone considers my indention scheme to be senseful, I would
 add an explaination to HACKING.

I appreciate your efforts PyroPeter. I have some suggestions though.

I recommend you to keep your patches small and focused.

Here's a guideline:
Each of those bullet points above should be at least one commit.

This huge all-in-one patch makes it very hard for me to review, and
frankly I don't like to deal with them at all.

Try to send debatable patches last - for example I'm not so sure that
removing 'next' and 'previous' is a good idea. So that applies when the
patch is a matter of opinion.

Thanks



Re: [aur-dev] Adding the HE language.

2010-08-14 Thread Loui Chang
On Sat 14 Aug 2010 16:13 +0200, PyroPeter wrote:
 On 08/14/2010 03:24 PM, PyroPeter wrote:
 
 I just noticed you are setting xml:lang and lang on the html-tag. So
 there isn't even any change needed. (Btw. that why I hate php, mixing
 markup and code is extremely obscure)
 
 The main problem seems to be the frequency of text-align-declarations in
 the existing style-sheets.
 
 This is what I have atm:
 (long diff is long)
 It would be nice to get some comments from right-to-left reading people.
 Why does direction:rtl; put punctuation at the beginning of the line? Is
 that wanted behavior or just a browser bug?
 
 I made a typo, correct patch:
  snip -
 diff --git a/web/html/css/containers.css b/web/html/css/containers.css
 index fc092de..4707dac 100644
 --- a/web/html/css/containers.css
 +++ b/web/html/css/containers.css
 @@ -3,6 +3,10 @@ body,table,td,img {
margin: 0;
padding: 0;
  }
 +/* Language specific formatting */
 +body:lang(he) {
 +  direction:rtl;
 +}
  /* Main Wrapper Data Format */
  td.preHeader {
background-color: #000;
  snap -
 
 What distinguishes the four different css-files?
 What is the sense of having style-declarations in the html/php-soup?

Beats me. It's just a result of people doing whatever needs doing
without caring too much where things go. Believe me it was a lot worse.
Things have been cleaned up a lot in the last couple years.

Anyways if something in particular bothers you, try submitting a patch.



Re: [aur-dev] Please update Greek language translation

2010-08-11 Thread Loui Chang
On Sun 08 Aug 2010 09:11 +0300, Panos Filip wrote:
 I've made a new updated el_GR.po translation, since I found out that some
 strings need updating.

Thanks I pushed all your patches.



Re: [aur-dev] Patch: German translation and CSS fixes

2010-08-11 Thread Loui Chang
On Mon 09 Aug 2010 01:21 +0200, PyroPeter wrote:
  On 08/08/2010 11:50 PM, Loui Chang wrote:
 On Sat 07 Aug 2010 02:54 +0200, PyroPeter wrote:
   On 08/07/2010 02:52 AM, PyroPeter wrote:
 appended is a patch that fixes some bugs in the german
 translation. There is also a patch that makes the
 Search-Form-buttons use a variable width to enable the german
 translation for Orphans (Verwaiste Pakete) to actually fit in
 there.
 
 As I have no idea how to get the AUR-software running, I did not
 test this changes.
 
 It would be nice if one of you could apply, test and push my patches.
 Maybe I will succeed this time...
 Any German speakers have any comments on these changes?
 
 As for the style changes, the width is there so we get at button of at
 least that size. So I can change it to min-width instead. How does that
 sound?

 That sounds good. I would do it in the CSS, as using both CSS-files
 and style-attributes is inconsistent.

Thanks I pushed your stuff.



Re: [aur-dev] Next update of the AUR?

2010-08-11 Thread Loui Chang
On Tue 10 Aug 2010 07:47 -0400, Denis Kobozev wrote:
 On Mon, Aug 9, 2010 at 10:52 PM, Loui Chang louipc@gmail.com wrote:
  What I'd really like to see is people
  running their own AUR, either taking the code or reimplementing it and
  creating custom repos. I'm not sure how realistic such a wish is.
 
 I always thought that a centralized repository for user-submitted
 packages was one of Arch's main strengths. Correct me if I'm wrong - I
 haven't been using Arch that long - but people used to run custom
 repos before AUR was written.
 
  If your patches aren't pushed to the git repo then please send a
  follow-up email. It may just still be in my queue for review.
 
 No, I think they're already in the repo.
 
  I understand your disappointment.
  It would be really nice if I could have a partner to work on and
  administer the AUR with, but it seems that no one in the Arch community
  really has enough initiative or time or expertise.
 
 Let's say I'd like to be such a person. Would I have to prove my
 commitment first?

Of course. It's important that I trust that you will be a good
caretaker. It would be nice if you could become a TU.



Re: [aur-dev] Next update of the AUR?

2010-08-11 Thread Loui Chang
On Wed 11 Aug 2010 21:27 -0400, Denis Kobozev wrote:
 On Wed, Aug 11, 2010 at 8:10 PM, Loui Chang louipc@gmail.com wrote:
  On Tue 10 Aug 2010 07:47 -0400, Denis Kobozev wrote:
  On Mon, Aug 9, 2010 at 10:52 PM, Loui Chang louipc@gmail.com wrote:
   It would be really nice if I could have a partner to work on and
   administer the AUR with, but it seems that no one in the Arch community
   really has enough initiative or time or expertise.
 
  Let's say I'd like to be such a person. Would I have to prove my
  commitment first?
 
  Of course. It's important that I trust that you will be a good
  caretaker. It would be nice if you could become a TU.
 
 Totally understandable, but I'm not at all interested in maintaining
 packages. That is, I think that the community is doing a good enough
 job already. I'm not really looking for any kind of special status, I
 just want to be able to give something back to Arch.

That's fine. I became a TU under the role of AUR dev/admin. I have very
few packages. If you were to take up that role - it would be a special
status in itself anyways. :D It would be important that you have
communication with TUs and devs. As a TU you have a vote in the
direction of the AUR.

Now, there's a reason why I'd like to see more independent repo
projects. So that the AUR isn't so tied down to one community's
infrastructure. It could help foster innovation as well. Unfortunately,
there hasn't been that much development there.



Re: [aur-dev] Next update of the AUR?

2010-08-11 Thread Loui Chang
On Wed 11 Aug 2010 22:23 -0400, Denis Kobozev wrote:
 On Wed, Aug 11, 2010 at 9:42 PM, Loui Chang louipc@gmail.com wrote:
  On Wed 11 Aug 2010 21:27 -0400, Denis Kobozev wrote:
  Totally understandable, but I'm not at all interested in maintaining
  packages.
 
  That's fine. I became a TU under the role of AUR dev/admin. I have very
  few packages. If you were to take up that role - it would be a special
  status in itself anyways. :D It would be important that you have
  communication with TUs and devs. As a TU you have a vote in the
  direction of the AUR.
 
 I guess I should read up about TUs, what their responsibilities are
 and how does one become a TU.
 
  Now, there's a reason why I'd like to see more independent repo
  projects. So that the AUR isn't so tied down to one community's
  infrastructure. It could help foster innovation as well. Unfortunately,
  there hasn't been that much development there.
 
 Have you ever shared this vision with TUs and devs? What did they think?

I have discussed it a little, but it's really up to the community to
implement and use these things. TUs and devs have their own systems
already.



Re: [aur-dev] Adding the HE language.

2010-08-08 Thread Loui Chang
On Sun 08 Aug 2010 06:21 +0300, Netanel Shine wrote:
 For the non-translate strings ill send you a patch, but we have another
 problem, its shows ok, but it should be RTL not LTR. can you do it some way
 that if use will choose hebrew the page will become to be RTL?

I would appreciate your help with this. I'm not really sure what the
issues are.



Re: [aur-dev] Hello Everyone

2010-08-08 Thread Loui Chang
On Sun 08 Aug 2010 08:03 +0530, Gaurish Sharma wrote:
 Hello Everyone,
 My name is Gaurish. I am arch Linux user(2+ years), quite happy.I
 wanted give back to community. so I thought I would help out with AUR.
 I understand aur is written in PHP and I know basic php, so think
 should be good to start off and learn more while code.  I have
 installed AUR on localhost. Now figuring out to move forward with
 this.

Hello Gaurish. I'm glad you're interested in helping out. :D
I'd say just fix what bugs you the most. Then you win!



Re: [aur-dev] Patch: German translation and CSS fixes

2010-08-08 Thread Loui Chang
On Sat 07 Aug 2010 02:54 +0200, PyroPeter wrote:
  On 08/07/2010 02:52 AM, PyroPeter wrote:
 appended is a patch that fixes some bugs in the german
 translation. There is also a patch that makes the
 Search-Form-buttons use a variable width to enable the german
 translation for Orphans (Verwaiste Pakete) to actually fit in
 there.
 
 As I have no idea how to get the AUR-software running, I did not
 test this changes.
 
 It would be nice if one of you could apply, test and push my patches.

 Maybe I will succeed this time...

Any German speakers have any comments on these changes?

As for the style changes, the width is there so we get at button of at
least that size. So I can change it to min-width instead. How does that
sound?

---BeginMessage---
Signed-off-by: PyroPeter abi1...@googlemail.com
---
 web/lang/de.po |   30 +++---
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/web/lang/de.po b/web/lang/de.po
index a9b6a2f..bcd0c1b 100644
--- a/web/lang/de.po
+++ b/web/lang/de.po
@@ -3,15 +3,15 @@
 # Translators: Pierre Schmitz pie...@archlinux.de, Matthias Gorissen 
siqu...@web.de, Lukas Kropatschek, Niclas Pfeifer
 
 
-$_t[Use this form to update your account.] = Hier kannst Du Deine 
Benutzerdaten ändern.;
+$_t[Use this form to update your account.] = Hier kannst Du Dein 
Benutzerkonto anpassen.;
 
 $_t[Leave the password fields blank to keep your same password.] = Lasse 
die Passwort-Felder leer, um Dein aktuelles Passwort beizubehalten.;
 
-$_t[You are not allowed to access this area.] = Du darfst diesen Bereich 
nicht betreten.;
+$_t[You are not allowed to access this area.] = Du darfst auf diesen 
Bereich nicht zugreifen.;
 
 $_t[Could not retrieve information for the specified user.] = Konnte keine 
Informationen zum angegebenen Benutzer abrufen.;
 
-$_t[Use this form to search existing accounts.] = Benutze dieses Formular, 
um nach vorhandenen Konten zu suchen.;
+$_t[Use this form to search existing accounts.] = Benutze dieses Formular, 
um nach Benutzerkonten zu suchen.;
 
 $_t[You do not have permission to edit this account.] = Du hast keine 
Berechtigung, dieses Konto zu ändern.;
 
@@ -21,9 +21,9 @@ $_t[You must log in to view user information.] = Du mußt 
Dich anmelden, um B
 
 
 
-$_t[Missing a required field.] = Ein benötigtes Feld fehlt.;
+$_t[Missing a required field.] = Ein benötigtes Feld ist nicht 
ausgefüllt.;
 
-$_t[Search] = Suche';
+$_t[Search] = Suche;
 
 $_t[The account, %h%s%h, has been successfully created.] = Das Konto %h%s%h 
wurde erfolgreich angelegt.;
 
@@ -134,7 +134,7 @@ $_t[required] = Notwendig;
 
 $_t[Update] = Aktualisieren;
 
-$_t[Submit] = Abschicken;
+$_t[Submit] = Paket hochladen;
 
 $_t[Password] = Passwort;
 
@@ -156,7 +156,7 @@ $_t[The most popular packages will be provided as binary 
packages in [community
 
 $_t[Trusted Users] = Vertrauenswürdige Benutzer (TU);
 
-$_t[You must supply a username.] = Du mußt einen Benutzernamen eingeben.;
+$_t[You must supply a username.] = Du musst einen Benutzernamen eingeben.;
 
 $_t[Packages added or updated in the past 7 days] = Pakete, die in den 
letzten 7 Tagen hinzugefügt oder geändert wurden;
 
@@ -226,11 +226,11 @@ $_t[Missing comment ID.] = Kommentar-ID fehlt.;
 
 $_t[Package category updated.] = Die Kategorie des Pakets wurde 
aktualisiert.;
 
-$_t[You must be logged in before you can edit package information.] = Du 
mußt Dich anmelden, um Paket-Informationen zu bearbeiten.;
+$_t[You must be logged in before you can edit package information.] = Du 
musst Dich anmelden, um Paket-Informationen zu bearbeiten.;
 
 $_t[Comment has been deleted.] = Kommentar wurde gelöscht.;
 
-$_t[You've found a bug if you see this] = Wenn Du dies ließt, hast Du 
einen Fehler gefunden...;
+$_t[You've found a bug if you see this] = Wenn Du dies liest, hast Du 
einen Fehler gefunden...;
 
 $_t[Comment has been added.] = Kommentar wurde hinzugefügt.;
 
@@ -250,7 +250,7 @@ $_t[Votes] = Stimmen;
 
 $_t[First Submitted] = Zuerst eingereicht am;
 
-$_t[Tarball] = Tar-Datei;
+$_t[Tarball] = Tar-Archiv;
 
 $_t[Be careful! The above files may contain malicious code that can damage 
your system.] = Sei vorsichtig! Die obengenannten Dateien könnten Code 
enthalten, der Dein System beschädigt.;
 
@@ -260,7 +260,7 @@ $_t[Location] = Ort;
 
 $_t[Flag Safe] = Als \Sicher\ markieren;
 
-$_t[Go] = Gehe zu;
+$_t[Go] = Suche;
 
 $_t[Unflag Out-of-date] = Markierung \Veraltet\ entfernen;
 
@@ -386,7 +386,7 @@ $_t[Use this form to create an account.] = Benutze 
dieses Formular um ein Kon
 
 $_t[Use this form to update your account.] = Benutze dieses Formular um 
Dein Konto zu aktualisieren.;
 
-$_t[You are not allowed to access this area.] = Es ist Dir nicht erlaubt 
diesen Bereich zu betreten.;
+$_t[You are not allowed to access this area.] = Es ist Dir nicht erlaubt, 
auf diesen Bereich zuzugreifen.;
 
 $_t[Unsafe] = Unsicher;
 
@@ -534,7 +534,7 @@ $_t[Could not create directory %s.] = Konnte 

Re: [aur-dev] Adding the HE language.

2010-08-08 Thread Loui Chang
On Sun 08 Aug 2010 20:43 +0300, Netanel Shine wrote:
 Good idea, i hope someone will do that ;) (and also will deploy and HE lang)
 
 On Sun, Aug 8, 2010 at 8:39 PM, PyroPeter abi1...@googlemail.com wrote:
  It seems like it would be a good idea to add direction:rtl; to the CSS.
  This makes text right-aligned and cuts off text at the right side.

Please avoid top-posting.

I really don't know how to go about providing such a feature, but
contributions are definitely welcome.



Re: [aur-dev] Please update Greek language translation

2010-08-08 Thread Loui Chang
On Sun 08 Aug 2010 09:11 +0300, Panos Filip wrote:
 I've made a new updated el_GR.po translation, since I found out that some
 strings need updating.
 
 I have uploaded the patch, please inform me if there is any problem in the
 text format.
 
 Question: The main text in the aur mainpage:
 
 * Welcome to the AUR! Please read the AUR User
 Guidelineshttp://wiki.archlinux.org/index.php/AUR_User_Guidelinesand
 AUR
 TU 
 Guidelineshttp://wiki.archlinux.org/index.php/AUR_Trusted_User_Guidelinesfor
 more information.
 Contributed PKGBUILDs must conform to the Arch Packaging
 Standardshttp://wiki.archlinux.org/index.php/Arch_Packaging_Standardsotherwise
 they will be deleted!
 *
 
 * Remember to vote for your favourite packages!
 Some packages may be provided as binaries in [community].*
 
 ^ how can we upload a translation for that text too ?

You can add those messages to the translation file manually.
Just check the source to make sure you've got the English index correct.

There's a problem with one of the strings:
 +$_t[Confirm your e-mail address:] = panosfi...@gmail.com;

You should translate that message rather than writing your email.


Re: [aur-dev] Adding the HE language.

2010-08-07 Thread Loui Chang
On Sat 07 Aug 2010 17:16 +0300, Netanel Shine wrote:
 Hey there, i was working on translating the AUR to my language, Hebrew.
 
 I am adding to this message the gzipped patched file.
 
 btw.
 i know his name lame, but i think he will work just fine.

Ah yeah something went wrong with your commit message.
Just glancing at the translation real quick I notice one error

 +$_t[Confirm your e-mail address:] = netanelsh...@gmail.com;

That message should be translated rather than putting your actual email.
If you're using the translation tool, there are a lot of strings that it
won't pick up as well (it's buggy), so test your translation with your
running copy of the AUR to see if you missed anything.

Cheers and thanks for your contributions.



Re: [aur-dev] Adding the HE language.

2010-08-07 Thread Loui Chang
On Sun 08 Aug 2010 01:17 +0300, Netanel Shine wrote:
 btw, it should be RTL, if you didnt know, mybe because of that it
 display like a bug.

Sorry I don't really know what Hebrew is supposed to look like. Is there
a problem displaying it properly?

http://louipc.mine.nu/images/he.po.jpg
http://aur.louipc.mine.nu/index.php?setlang=he

Looks like you did miss some strings.
Do you want to add them and then submit a new patch?



Re: [aur-dev] Can I please get a dump of the pkgbuilds in AUR?

2010-08-01 Thread Loui Chang
On Sun 20 Jun 2010 10:10 +0100, Nathan Wayde wrote:
 I know this has come up before with issues about scraping the files
 in AUR but this is a different question. Is it possible to get a
 dump of all the files in AUR, don't ask for what reason I need
 them[1].
 
 This would only be a one-time thing from then on I can sync via rss
 with no problem.
 
 [1] My only answer will be that the descriptions in AUR are pretty
 bad and the search is almost useless if you don't know the name of a
 pkg you want to search for.

I recommend helping improve the AUR's search functionality then.
I cannot see any practical reason for you to have all the files in the
AUR. Do you want to do some kind of analysis or something?

It would be nice if you could share your intentions if you expect to
receive data in your preferred format. Otherwise all the files are
freely accessible via other methods.

That said, I still need a really compelling reason to do this. It would
probably be better to explore other ways to solve your problem.



Re: [aur-dev] Accept packages with build and/or package function (FS#19914)

2010-06-23 Thread Loui Chang
On Wed 23 Jun 2010 16:28 +0200, Andrea Scarpino wrote:
 With makepkg 3.4.0 is possible to avoid the build() function and use
 package() only.
 Current AUR checks only for build() when it parsing PKGBUILD, this
 patch checks for both. build() OR package() function is needed.

I think we should just remove checks for those functions altogether.
A PKGBUILD without them is still valid.




Re: [aur-dev] [PATCH] remove build function check

2010-06-23 Thread Loui Chang
On Thu 24 Jun 2010 00:19 +0200, Andrea Scarpino wrote:
 ---
  web/html/pkgsubmit.php |   16 +---
  1 files changed, 1 insertions(+), 15 deletions(-)

Applied. Thanks.


Re: [aur-dev] FS#17109: AUR passwords are not salted

2010-06-04 Thread Loui Chang
On Wed 26 May 2010 22:22 +0200, Linas wrote:
 Loui Chang wrote:
  On Mon 19 Apr 2010 15:39 +0200, Linas wrote:

  Loui Chang wrote:
  
  Thanks for your support. Here goes an attempt.
  I have mixed my suggestions with Denis idea of changing the hash algorithm
  at the same time plus a few bits I found on the way.
 
  Actions performed by this patch:
  salt to be NULL, in which case it is treated as md5 hashed password.
  *All entries can be automatically updated by a -to be written- script.
  *Removes add salt on login code, per above.
  *Salted passwords now use sha512 instead of md5.
  *Adds requirement on hash extension (usually bundled as static).
  *try_login() only performs one query to verify user login instead of 5.
  *generate_salt now uses mt_rand()
  *Reject passwords given by GET.
 
  Sorry for the late response.
  Ideally each of these actions should be a separate patch.
 
  That would enable changes that are straightforward to be applied
  quickly, while the other changes might still need review.
  The -to be written- script also needs to be included for the change to
  be complete.
 
 Ok. I have splitted it on three patches.
 The first patch with the changes to acctfuncs.inc, which speeds up
 try_login,
 affect the lazy salting, and changes the $_REQUEST to $_POST.
 A second patch adding the mt_rand (the one-line change to generate_salt).
 A third patch actually using sha512 (salted_hash function, aur-schema.sql
 and README) with a format that allows the script update to work.
 
 Should the update script try to perform the alter table itself? If so,
 assuming that it has the Salt field (ie. Kobozev change was applied to
 the db) or not?

No structural changes have been applied to the db since at least the
last code release. I'll apply the second patch. I'll still have to
review the rest of it.

* Messages generally should use i18n __(my message)
* We should keep failed auth ambiguous: wrong username or passwd
  instead of wrong passwd
* Please use `git format-patch` to generate patches.

Thanks



Re: [aur-dev] [PATCH] Add sorting by Voted and Notify fields

2010-06-04 Thread Loui Chang
On Sun 30 May 2010 00:53 +0200, Lukas Fleischer wrote:
 This patch adds the possibility to sort by Voted and Notify columns
 in package search results. Fixes FS#13643 [1] (and maybe also FS#5401
 [2]).

Looks good. Thanks.


Re: [aur-dev] FS#17109: AUR passwords are not salted

2010-04-18 Thread Loui Chang
On Sun 18 Apr 2010 01:01 +0200, Linas wrote:
 Arch User Repository (AUR) wrote:
  The following task has a new comment added:
 
  FS#17109 - AUR passwords are not salted
  User who did this - Loui Chang (louipc)
 
  --
  A patch has been committed to git which will salt the passwords.
  --
 
  More information can be found at the following URL:
  http://bugs.archlinux.org/task/17109#comment60615
 
 These are good news, however, I don't think it is as good as it would be:
 
  # get salt for this user
   $salt = get_salt($userID);
   if ($salt) {
# use salt
  ...
   $passwd_result = mysql_fetch_row(db_query($passwd_q, $dbh));
  } else {
  ...
   $nosalt_result = mysql_fetch_row(db_query($nosalt_q, $dbh));
  }
 
 
 This gratuitously changes one sql query for login to three.
 
 It could be done as:
 SELECT ID,Passwd,Salt FROM Users .+  WHERE ID = '$userID';
 $result = mysql_fetch_row()
 if ($result[0]) { return false; } //No such user
 if ( salted_hash($passwd, $result[2]) == $result[1] ) { return true; }
 if ( is_null($result[2])  (md5($passwd) == $result[1]) { update hash;
 return true; }
 
 
 Since it already encapsulates the salting into a function, it would be
 trivial to allow the
 salting compatible with already stored passwords, so they can be updated
 with a script:
 
 function salted_hash($passwd, $salt)
 {
  if (strlen($salt) != 32) {
  trigger_error('Salt does not look like an md5 hash', E_USER_WARNING);
 }
  return md5($salt . md5($passwd));
 }
 
 Finally, generate_salt() would be safer using mt_rand() instead of rand().

Thank you for your suggestions. These are things that are best discussed
on the aur-dev mailing list.

Seems like you've put some thought into this. Why don't you submit a
patch?



Re: [aur-dev] [PATCH] add search only by name and use it as default

2010-04-15 Thread Loui Chang
On Wed 10 Mar 2010 20:01 +0100, Andrea Scarpino wrote:
 On Wednesday 10 March 2010 19:50:25 Nathan Wayde wrote:
  Please don't make it name-only by default, the search is crappy enough
  already without the extra effort to make it kinda-work-sorta.

 I think is better to search by name as default.

Please test your patches!

Missing a closing parenthesis:
+   $q.= AND (Name LIKE '%.$_GET['K'].%' ;

Also, the default should remain name and desc even when opening up the
advanced search, so it should be the first option in the combobox.

Thanks for the patch. I've applied those changes.


Re: [aur-dev] Regexp Support for AUR package search; wouldn't it be nice?

2010-03-28 Thread Loui Chang
On Mon 22 Mar 2010 02:51 +0800, lolilolicon wrote:
 Hi, I did a `grep -R LIKE aur-1.6.0` and it seems to me that changing
 four of those LIKE's to RLIKE would add Regexp support for package
 search.

 Currently, the only regexp supported by AUR are % and _. I think AUR
 should really somehow grow some support for real regular expressions.

 I'm not aware of any issue this may introduce, except for a little bit
 heavier on resources; adding a timeout on queries should avoid shitty
 regexp queries as well.

Yeah it's something I've considered, but I haven't had a chance to
explore the issues that it may introduce.



Re: [aur-dev] [PATCH] add link to account profile in out-of-date notification

2010-03-10 Thread Loui Chang
On Wed 10 Mar 2010 23:05 +0100, Andrea Scarpino wrote:
 Reading at FS#9582, could be useful to add a link to account information page 
 of the user who has flagged your package as out-of-date.
 Without using HTML in the code, this patch adds that link to the bottom of 
 the 
 mail body.

Thanks. Pushed.



Re: [aur-dev] Fix French translation (FS#18533)

2010-03-07 Thread Loui Chang
On Wed 03 Mar 2010 00:19 +0100, Andrea Scarpino wrote:
 I think that the translation of Adopt packages is right.
 
 This minor patch fixes the others phrases.
 
 http://bugs.archlinux.org/task/18533

Thanks. That's pushed.



Re: [aur-dev] [PATCH] Updated README for local AUR installation

2010-02-16 Thread Loui Chang
On Tue 16 Feb 2010 08:20 -0800, Thayer Williams wrote:
 I've updated the web/README to make the instructions a bit clearer on
 setting up a test environment of the AUR.
 
 Also, I plan to submit several patches for HTML/template updates over
 the next couple of weeks so please let me know if this patch format is
 not correct.

The patch format is fine.

The problem with the patch itself is that you're changing things that
don't need to be changed. There's a lot of unnecessary reformatting.
Seems like you prefer a wider text width.

People needing help on setting up an AUR development environment should
probably be sending mail to aur-dev only, not aur-general.

Please try to keep unnecessary changes to a minimum.
Thank you for looking into the code and trying to improve the AUR.



Re: [aur-dev] [PATCH] Make whitespace significant in comments. Fixes FS#14391.

2010-02-04 Thread Loui Chang
On Thu 14 Jan 2010 00:30 -0500, Ronuk Raval wrote:
 Originally reported the bug [1] a while ago, but butted heads into it again
 recently [2]. Here's my rather small patch to fix the issue.
 
 Note that this would cause the column to stretch out to fit its contents,
 possibly breaking layout. However, I felt that to be an adequate compromise
 given the goal of altering comments as little as possible.

While I don't like altering comments, I also don't like people posting
large PKGBUILDs and patches in that section as they quickly become
obsolete.

That's why I never bothered changing it. The proper text is still
preserved in the emails and database. I'd think maintainers would sooner
extract PKGBUILDs and patches from their email, but I could be wrong.  I
wouldn't mind applying this patch anymore though. I can just put a big
message asking people to use email or pastebin to suggest changes to
maintainers. Hopefully people can follow that practice.

Please check your email client. Somehow it altered the patch and tabs
were converted to spaces, so this won't apply.



Re: [aur-dev] Safe and relatively reliable PKGBUILD parser.

2010-01-09 Thread Loui Chang
On Sat 09 Jan 2010 21:23 +0100, Xyne wrote:
 You haven't fully understood how it works so I hope you don't mind if I
 try to explain it again.
 
 I first check the PKGBUILD with /bin/bash -n PKGBUILD. If this
 command exits without error then the PKGBUILD contains valid syntax,
 most importantly it does not contain extra closing brackets (}).
 [...]

Wow this is quite clever. It definitely would make the job of parsing
much easier. Thanks for the explanation.



Re: [aur-dev] patch for AUR about setting the DEFAULT_LANG

2010-01-09 Thread Loui Chang
On Mon 30 Nov 2009 17:27 +0800, Athurg Gooth wrote:
 When i port a chinese version AUR,  I fount this bug. That once i setting a
 default language to sth(eg: zh_CN) by change DEFAULT_LANG macr define in
 web/lib/config.inc, it won't work, and this language page(here is zh_CN)
 could not show its native strings.

DEFAULT_LANG was supposed to indicate the language that strings in the
code are written in, so that if someone asked for 'en' then the code
wouldn't look for en.po and come up with an error.

I think your idea makes more sense though.

 Then i turn back to check if i got a wrong spelling. But i fount the
 developer have told us that options couldn't be change(in
 web/lib/config.inc, line 48). So I think maybe its a bug which havn't been
 fixed.
 
 After i check all the code about language setting, i think i got  the
 reason. We have two problems which cause that bug.
 
 First, in .../web/lib/aur.inc, between line 296 to line 298. Even the
 $LANG==DEFAULT_LANG, we should include the $LANG.po file. Because once the
 DEFAULT_LANG isn't english, we also need translate the strings.
 So i just suggest add an 'else' branch after line 298 to include
 DEFAULT_LANG.po.such aselse{include_once(DEFAULT_LANG..po;)}
 
 Second, in .../web/lib/translator.inc, between line 52 to line 62. The
 reason is as the same as i said above. If we havn't set a $LANG var, the
 $LANG will be set to DEFAULT_LANG. But the DEFAULT_LANG doesn't mean
 english. Even the $LANG havn't been set, the $_t maybe setting (see  Firest
 above) when include from DEFAULT_LANG.po. We should also translate them.
 So i think we should remove the 'else' identify. make the 'else' branch work
 for ever.
 
 By the way if the function include_lang() in .../web/lib/translator.inc,
 between line 32 to line 40 is an old function to make the lang func? Maybe
 we should remove them.

Indeed. I think we can remove it now.

 I prepare to make a mirror for our AUR to chinese people, how could i got
 the databases an files from aur.archlinux.org. OR i couldn't make a mirror
 for that.

It's great to hear that people are playing with the AUR code.
Thanks for the patch. I've applied a slightly modified version. It has
helped reveal some redundant code that we could eliminate too. Please
let us know more about your ideas about mirroring the AUR.

Thanks and cheers!
Sorry about the delay.



Re: [aur-dev] Update Greek Translation

2009-11-09 Thread Loui Chang
On Mon 09 Nov 2009 11:58 +0200, Panos Filip wrote:
 Hello to everybody !
 
 I'd like to commit a patch, that will update the Greek translation.
 
 Thanks to all those who helped me finish this contribution.

Thanks. Please remember to put a blank line between your commit message
and sign-off next time. Cheers!



Re: [aur-dev] [PATCH 2/2] Add Croatian translation

2009-10-27 Thread Loui Chang
On Tue 27 Oct 2009 22:15 +0100, Terzić Slobodan wrote:
 Hello,
 
 I would like to notify translator that current croatian translation (the one 
 that's currently in use) has no croatian strings at all. Except for the 
 language name, it's all english.
 Please fix. ;)

There are strings but for some reason the config is using 'cr' as the
Croatian language code rather than 'hr'.

That's fixed now.


Re: [aur-dev] Αdding Greek Translation to AUR

2009-10-27 Thread Loui Chang
On Tue 27 Oct 2009 14:18 +0200, Panos Filip wrote:
 Hello to everyone !
 
 I'd like to submit a Greek translation for AUR. I would also like to thank
 all those that helped me finish the translation.
 
 I though that it could be nice to have the greek language on AUR along with
 the other languages.

Thanks for the contribution.
You'll see it live on the next AUR release.


Re: [aur-dev] [PATCH] Out-of-date counts both packages in unsupported and community

2009-10-26 Thread Loui Chang
On Mon 26 Oct 2009 21:14 +0100, Andrea Scarpino wrote:
 patch attached

I've just orphaned all dummy packages. Hope that helps.



Re: [aur-dev] [PATCH] Add newly submitted packages functionality with json interface

2009-10-11 Thread Loui Chang
On Thu 08 Oct 2009 16:30 -0700, elij wrote:
 Well, if people can get memcached installed on the aur box, and it can
 be made a requirement for running the aur, then I would have no
 problem coding up a new rss class that returned rss2.0 _or_ json,
 based on a passed in parameter. This could wholly replace the existing
 rss2.php/rss.php mechanism.
 
 I think adding alternate export types (json) to the rss mechanism
 makes more sense than adding rss logic to the rpc interface.
 
 Thoughts?

Actually I think it makes more sense to keep the json stuff together.
Functions for newest packages, or other interactions could be put into
'include files' if that makes things neater.



Re: [aur-dev] [PATCH 2/2] Add Danish translation

2009-10-05 Thread Loui Chang
On Tue 06 Oct 2009 00:17 +0200, Laszlo Papp wrote:
 Please check it. Any feedback is welcome!

Can you ask the translators to subscribe to aur-dev and send
translations directly? Thanks.



Re: [aur-dev] [PATCH 2/2] Add Norwegian translation

2009-10-01 Thread Loui Chang
On Wed 30 Sep 2009 03:36 +0200, Laszlo Papp wrote:
 Hello!
 
 Sorry for the previous mail, feel free to delete it.
 
 You can reach here the translation too:
 http://djszapi.homelinux.net/0001-Add-Norwegian-translation.patch

Pushed.


Re: [aur-dev] [PATCH 2/2] Add Czech translation

2009-10-01 Thread Loui Chang
On Thu 01 Oct 2009 03:37 +0200, Laszlo Papp wrote:
 On Thu, Oct 1, 2009 at 12:35 AM, Loui Chang louipc@gmail.com wrote:
 
  On Wed 30 Sep 2009 22:17 +0200, Laszlo Papp wrote:
   Hello!
  
   You can reach here the Czech translation:
   http://djszapi.homelinux.net/0001-Add-Czech-translation.patch
  http://djszapi.homelinux.net/0001-Add-Norwegian-translation.patch
   Any feedback would be great!
 
  I'm confused. Can you send the translations as gzipped attachments to
  this list? Thanks.

Czech translation pushed.


Re: [aur-dev] [PATCH 2/2] Add Croatian translation

2009-10-01 Thread Loui Chang
On Thu 01 Oct 2009 23:14 +0200, Laszlo Papp wrote:
 Hello!
 
 I attached the Croatian translation.
 Please check it.

Pushed. Thanks.


Re: [aur-dev] aur-general: I no longer receive messages.

2009-09-30 Thread Loui Chang
On Wed 30 Sep 2009 19:22 +0200, Xyne wrote:
 Can someone please check if there's anything wrong with my subscription
 to aur-general? I no longer recieve messages from the list. I've tried
 unsubscribing and resubscring and have checked my options as well.
 
 I even get confirmation emails when I post to the list.
 
 I don't think it's my email client (sylpheed) either as aur-dev and
 other lists still work as before (all of which use the same email
 account). I have checked my junk mail but there's nothing there (from
 Arch anyway).
 
 Any help would be appreciated. Thanks.

Have you tried a different mail client?

I'm not exactly sure who deals with the mailing lists but you might want
to file a bug report at http://bugs.archlinux.org instead.



Re: [aur-dev] [PATCH 2/2] Add Czech translation

2009-09-30 Thread Loui Chang
On Wed 30 Sep 2009 22:17 +0200, Laszlo Papp wrote:
 Hello!
 
 You can reach here the Czech translation:
 http://djszapi.homelinux.net/0001-Add-Czech-translation.patchhttp://djszapi.homelinux.net/0001-Add-Norwegian-translation.patch
 Any feedback would be great!

I'm confused. Can you send the translations as gzipped attachments to
this list? Thanks.



Re: [aur-dev] some patches for cleanup and other stuff

2009-09-28 Thread Loui Chang
On Sun 27 Sep 2009 16:40 -0700, elij wrote:
 In response to a forum thread about stagnating aur development, 
 I worked on the aur a bit when I was bored today.
 
 The first patch is probably the most invasive, and I must admit that
 I haven't tested it (offline -- not dev sandbox). I think the spirit of
 this patch, if not the implementation of it, is needed.
 
 The rss2 - rss rename would require a simple apache rewrite rule
 should it go to production. I made notes on the patch itself for my
 reasoning as to the rename.
 
 The rest are misc patches and smaller cleanup elements. Feel free
 to use some, none, or all of them.

I pushed most of these, in a different order. Hah.
Thanks for the contribution.


Re: [aur-dev] [PATCH] Add usage output info for maintainer search extension

2009-09-28 Thread Loui Chang
On Tue 29 Sep 2009 00:50 +0200, djsza...@gmail.com wrote:
 From: Laszlo Papp djsza...@gmail.com
 
 Add msearch type to the list on http://aur.archlinux.org/rpc.php
 
 Signed-off-by: Laszlo Papp djsz...@archlinux.us

Thanks. Pushed.


Re: [aur-dev] [PATCH] Serbian translation for AUR

2009-09-28 Thread Loui Chang
On Tue 29 Sep 2009 01:25 +0200, Terzić Slobodan wrote:
 Hello,
 
 I've made Serbian translation for AUR, you can find patch in attached archive.
 Please merge.
 
 Also, it seems I've found a bug in translation_tool script, as it doesn't 
 extract all messages.
 During a local test I saw that other translations have a lot more translatabe 
 messages than translation_tool gave me, so I had to compare sr.po to other 
 translation files and add missing strings manually.
 Dunno what happened, maybe it was me doing something wrong. :/

Not your fault. There is indeed a bug in the translation_tool.
Thanks for the translation.



Re: [aur-dev] [PATCH 1/1] fix for FS#15947

2009-09-27 Thread Loui Chang
On Sun 27 Sep 2009 20:59 -0700, elij wrote:
 
 Fix for maintainer search ticket: FS#15947
 Also http://mailman.archlinux.org/pipermail/aur-dev/2009-September/000892.html

Thanks. For future patch submissions please put a more descriptive
subject, such as Add maintainer search to json interface. Closes
FS#15947



Re: [aur-dev] Updated Ukrainian translation

2009-09-22 Thread Loui Chang
On Fri 18 Sep 2009 00:39 +0300, Roman Kyrylych wrote:
 Hi!
 
 This translation update is done by Danylo Korostil ted.korosti...@gmail.com
 Apparently he had some problems with subscribing and/or sending to this list,
 so I'm sending this on behalf of him.
 
 I am not sure if it applies cleanly to the current master branch though,
 so let me know if any fixes are needed.

Thanks for that. It seems to work.




Re: [aur-dev] [aur-general] AurJson - orphan packages

2009-09-16 Thread Loui Chang
On Mon 14 Sep 2009 22:46 +0800, Gergely Imreh wrote:
 The following patch adds the Orphan field to the aurjson output. For
 username we would need  to hit the database once more (maybe, have to
 think more SQL for that), but the Orphan-ness is quite straightforward
 to evaluate. So let's just do that first.
 
 This patch, however, might clash with one patch I sent in a few days
 ago [1], since that one hasn't been applied to the repo, yet. Anyway,
 neither of those are hard to see where they should go...
 
 Any comments?

 @@ -139,6 +140,8 @@ class AurJSON {
  if ( $result  (mysql_num_rows($result)  0) ) {
  $row = mysql_fetch_assoc($result);
  mysql_free_result($result);
 +$row['Orphan'] = ($row['MaintainerUID'] == 0 ? 1 : 0);
 +unset($row['MaintainerUID']);

Just leaving MaintainerUID as-is here should be good enough I think.
I'll push that if you want to resubmit. Thanks.



Re: [aur-dev] AurJson - orphan packages

2009-09-16 Thread Loui Chang
On Thu 17 Sep 2009 10:34 +0800, Gergely Imreh wrote:
 2009/9/17 Loui Chang louipc@gmail.com:
  On Mon 14 Sep 2009 22:46 +0800, Gergely Imreh wrote:
  The following patch adds the Orphan field to the aurjson output. For
  username we would need  to hit the database once more (maybe, have to
  think more SQL for that), but the Orphan-ness is quite straightforward
  to evaluate. So let's just do that first.
 
  This patch, however, might clash with one patch I sent in a few days
  ago [1], since that one hasn't been applied to the repo, yet. Anyway,
  neither of those are hard to see where they should go...
 
  Any comments?
 
  @@ -139,6 +140,8 @@ class AurJSON {
           if ( $result  (mysql_num_rows($result)  0) ) {
               $row = mysql_fetch_assoc($result);
               mysql_free_result($result);
  +            $row['Orphan'] = ($row['MaintainerUID'] == 0 ? 1 : 0);
  +            unset($row['MaintainerUID']);
 
  Just leaving MaintainerUID as-is here should be good enough I think.
  I'll push that if you want to resubmit. Thanks.
 
 The reason I have the Orphan and not the MaintainerUID, because
 from the website it is not possible to connect the MaintainerUID and
 the username, and I'm not aware of any way one can search for the
 username or packages using MaintainerUID. That makes this number
 pretty meaningless except for AUR internal usage.
 
 Also, having an Orphan value is completely self-explanatory (as are
 the OutOfDate and all other fields...) - one can just look at the json
 output for the very first time in their life and see what means what.
 The If  MaintainerUID is 0 then it is an orphan package, if whatever
 0 then someone maintains it is a needed explanation beyond the
 aurjson output.
 
 If you want to change something, then remove the removal of the
 MaintainerUID (for some usage I might not thing of right now). The
 orphan field should stay in my opinion.

I understand how this might be useful for the average user, but they'll
most likely never see it. It only needs to be understood once by the
application developer, and it's documented - in the code heh.

It's inefficient to add more processing just for aesthetic purposes.

So let's think about adding something useful.

You can get usernames with one query:

   select Name,Username from Packages left join Users on
   (Packages.MaintainerUID = Users.ID) where DummyPkg = 0 limit 10;

I just tested this against plain MaintainerUID. That yields a
performance hit of about 200 milliseconds for 15828 packages, which
doesn't seem too bad.

I'm testing on a slow system anyways.

So I think it may be alright to just grab Username.
Orphaned packages will have a NULL Username.
This should be added to both info and search functions.



[aur-dev] Query Benchmarking

2009-09-16 Thread Loui Chang
On Wed 16 Sep 2009 22:48 -0500, Dan McGee wrote:
 OMG, query benchmarking? I've never seen this in the AUR before. :P

Hah, why not. There's kind of a tradition of being picky with the JSON
interface.

 I would just do it right and return a maintainer name. Worry about
 performance later; there really is little to no penalty here for this.
 I already told you one query that needs optimizing the other day that
 is much more prevalent than this one.

Which other day? I thought you fixed all of them.
Please refresh my memory. Thanks.



Re: [aur-dev] AurJson - orphan packages

2009-09-16 Thread Loui Chang
On Thu 17 Sep 2009 12:31 +0800, Gergely Imreh wrote:
 Also, I'm a bit puzzled by the objection to a single line of
 $row['Orphan'] = ($row['MaintainerUID'] == 0 ? 1 : 0);
 which was countered with a suggestion of a full database re-query.

 Would THAT really take that much shorter? Have to do some checks in my
 test aur install to wrap my head around it. Would have thought that
 AUR has a lot of other inefficiencies that can be improved (pretty
 sure that my PKGBUILD parsing routines are no exceptions), before we
 worry about a single if.

My concern is that nowadays the JSON interface is being accessed quite a
lot. That can only grow as more users access the site and more features
are added. It's best to be prudent and get the best value out of the
code that we can. Those instructions don't add any value in my opinion.
I see it as the equivalent of adding:

# This is a comment
echo ;

 Having said all this, I can see the point of returning the username /
 orphan (or username / ?) instead of Orphan logical variable. I

There's no possibility of someone having  as a username, so that's
best. No extra processing either.

 wouldn't have chosen it myself originally because of the extra
 database hit, but now it seems to be more in line with the behaviour
 of the web interface.

Sorry. I was just showing how to grab the Username in a query.
You would build that into the existing queries, so there's only one
query per rpc request.

 Loui, do you want to write that changes, or should I send an updated
 patch? I don't mind either way, glad to get the job done. :)

You're certainly welcome to give it a shot.
If you're finding it difficult, I can write the patch.
I'm a bit lazy though. :P



Re: [aur-dev] [PATCH] Fix: FS#15526 non-UTF8 character in rpc output

2009-09-14 Thread Loui Chang
On Thu 10 Sep 2009 02:01 +0800, Gergely Imreh wrote:
 Currently AUR does not check the uploaded packages, whether they are
 correctly in UTF8 encoding. If there are fields (such as $pkgdesc)
 that contain such non-UTF8 characters, the rpc interface chokes on
 those fields: even if there's data successfully retrieved from the
 database, rpc returns null.
 In an effort to make such errors in the PKGBUILDs debugged more easily,
 let's force rpc to have more useful output: try to convert non-UTF8
 fields to UTF8. If it's a success, good. Partial success (some characters
 showing as \u) is ok. Failure results in error message printed to that
 field.

It would be nice if this could appear in search as well as info.
The important thing is that we're giving the user as much info as
possible, debugging is a secondary goal.



  1   2   >