Code Monkey home page Code Monkey logo

freshports's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

freshports's Issues

Slave ports can have their current vuln count incorrectly displayed

Current vuln status is shown by a skull at the top of the page.

Which skull to show (active or greyed out) is decided by an entry for this port in the ports_vulnerable table, which has three column: port_id, current, past

The stored procedure PortsVulnerabilityCountAdjust(port_id) sets these values. There seems to be a problem with this query:

            SELECT count(distinct vuxml_id)
              INTO l_VulnCurrent
              FROM commit_log_ports_vuxml CLPV, commit_log_ports CLP, ports P
             WHERE CLP.commit_log_id = CLPV.commit_log_id
               AND CLPV.port_id      = CLP.port_id
               AND P.id              = CLP.port_id
               AND P.version         = CLP.port_version
               AND P.revision        = CLP.port_revision
               AND CLP.port_epoch    = P.portepoch
               AND P.id              = p_PortID;

I'll have to look into that to see why it goes wrong, but I suspect its because there is no commit which affects the current version of the port. This is a special case for slave ports, because their version can be derived from the master and there may not be a commit against the slave port for a given PORTVERSION value.

I am not sure how best to solve this.

Refreshing a port can leave the wrong version at the top of the page

The term 'refresh a port' is misleading. It is actually refresh a commit.

Sometimes a commit does not finish processing; perhaps the svn update could not be completed successfully. The commit is marked by setting commit_log_port.needs_refresh to a non-zero value, usually 7.

When a commit is processed, the ports tree is svn up'd to that SVN number. make is invoked to extract values form the port via 'make -V'. This allows us to grab the DEPENDS etc.

We also grab the PORTVERSION and PORTREVISION and set that in the Commit History.

We also update port.version and port.revision with that value. This step is appropriate when we are processing the most recent commit for a port. If it is not the most recent commit, you get the wrong value displayed at the top of the page.

missing-port-categories.sh should be queued instead of running from cron

If missing-port-categories.sh is run while a commit is being processed, false positives can occur:

This is a list of ports that do not have entries in the ports_categories table
This can be fixed with this query:
begin;  insert into ports_categories select id, category_id from ports_active PA WHERE NOT EXISTS (SELECT * from ports_categories PC where PC.port_id = PA.id and PC.category_id = PA.category_id);
 id   | category_id |   name    | category |        port        
-------+-------------+-----------+----------+--------------------
38110 |           4 | appleseed | graphics | graphics/appleseed
(1 row)

If this script is queued hourly and run from job_waiting.pl, this will not occur.

Graphs moved to another hostname?

Could we move graphs to another hostname? e.g. stats.freshports.org

One of the downsides to all these hostname: creating SSL certs.

refreshing of ports can be done in between commits

refresh-unrefresh-ports.pl is designed to run a few ports. When we have 1000s to fix, it'd be nice if they ran in the background, in between processing of incoming commits. We could do that the same way we process MOVED and UPDATING.

Create page showing queue status

commits processed in the past 24 hours, past hour, past 5 minutes

commits in the queue

Whether or not commit processing is enabled

Add anchors for UPDATING, commit history

I think there should be a way to link directly to the part of the ports page below the dependency lists (which can be long and difficult to scroll past without overshooting).

With a keyword set up in the browser, I can enter, e.g. "fp www/apache24" and end up at http://www.freshports.org/www/apache24. It would be most helpful if I could jump directly to the interesting parts, such as the UPDATING entries and the commit history:

There are some anchors, e.g. "mastersites", but they look more like development artifacts.

Display PKGNAME on webpage

Sometimes, PKGNAME != dir name, which can cause issues if creating a new VULN entry... if you get it wrong.

Change SVN URL format to short/pretty form

!! ISSUE ONE, YEH BABY !!

Currently, freshports SVN urls are in the form:

http://svnweb.freebsd.org/ports?view=revision&revision=

An alternative (shorter) form is supported, as follows:

https://svnweb.freebsd.org/changeset/ports/390304

These correctly redirect and expand to the correct place, but are much prettier when copying/pasting (especially into bugzilla, and other third party systems)

It might also help Google juice and URL crawl-ability in some cases

PS: Congratulations on the repo! I look forward to an export of the freshports.org code soon ;)

split config.pm

I think config.pm needs to be split. Some stuff in there is sensitive, some is not. e.g. database passwords. Not all scripts need the db password, but some need the other stuff.

e.g. check_freshports_queue

UPDATING is not being processed.

[May 23 17:20:52] dvl: freshports appears to not be picking up ports/UPDATING changes.
[May 23 17:21:55] dvl: last update that it processed was 2016-04-18. dev.freshports.org seems fine, beta.freshports.org is even worse.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.