目前的足跡: » portscout

軟體描述

portscout is a tool which looks for new versions of software in the FreeBSD ports tree, and potentially other software repositories.

Various factors make this task a bit more difficult than it might initially seem. In particular, the array of weird and wonderful versioning schemes software vendors manage to come up with.

portscout spawns several child processes and does its version checking in parallel, while attempting to best-guess strange-looking version numbers, navigate around unhelpful sites and web servers, and contend with the CPU-heavy rapidly-expanding FreeBSD ports system.

In addition to all this, it is possible to generate nice HTML reports and send reminder mails to interested parties.

安裝方式

FreeBSD

  1. $ cd /usr/ports/databases/postgresql82-server ; sudo make install clean

    這邊的 PostgreSQL 沒有硬性規定只能用 82 的版本,可以依自己喜好來選擇。

  2. $ cd /usr/ports/ports-mgmt/portscout ; sudo make install clean
  3. 安完裝後,開始建立 portscoutPostgreSQL 上的帳號
    $ createuser -U pgsql -P portscout
    # 輸入兩次密碼
    Enter password for new role:
    Enter it again:
    # 問是不是要變成超級使用者
    Shall the new role be a superuser? (y/n) n
    # 提不提供開資料庫的權限
    Shall the new role be allowed to create databases? (y/n) n
    # 這個帳號是有有新增帳號的權限
    Shall the new role be allowed to create more new roles? (y/n) n
    CREATE ROLE
  4. 建立 portscout 的 Database (編碼使用 UNICODE)
     $ createdb -U pgsql -E UNICODE portscout
  5. 匯入基本的 portscout 資料庫 schema
    $ psql portscout portscout < /usr/local/share/portscout/sql/pgsql_init.sql
  6. 在開始使用 portscout 之前,記得先更新 port tree
    $ cd /usr/ports ; sodu make update && sudo portsdb -U
  7. 修改 portscout 設定檔、網頁模版
    設定檔位置:
    /usr/local/etc/portscout.conf
    網頁模板:
    /usr/local/share/portscout/templates

使用介紹

執行方式

  • 第一次使用,請記得使用此指令來匯入 ports tree 到 PostgreSQL
    $ sudo portscout build
  • 版本檢查
    $ sudo portscout check
  • 將結果生成 HTML 格式
    $ sudo portscout generate

使用範例

  • 假設你已經完成了 portscout build 這個指令,往後你只需使用 portscout rebuild 便能更新原有的資料庫。
    $ sudo csup -L1 -h cvsup3.tw.FreeBSD.org/usr/share/examples/cvsup/ports-supfile \
    > /var/log/cvsup/_supdata/cvsup-`date '+%Y%m%d'`.log
    $ sudo portscout rebuild
  • 當一切就緒後,只需寫個 Shell Script 把它加入排程來幫你完成一切的工作。
    #!/bin/sh
    mkdir -p /var/log/cvsup/_supdata
    touch /var/log/cvsup/_supdata/cvsup-`date '+%Y%m%d'`.log
     
    cd /usr/ports
    csup -L1 -h cvsup3.tw.FreeBSD.org /usr/share/examples/cvsup/ports-supfile > \
    /var/log/cvsup/_supdata/cvsup-`date '+%Y%m%d'`.log
    portsdb -U
    cd /var/log/cvsup
    portscout rebuild
    portscout check
    portscout generate

設定檔介紹

預設安裝是在 /usr/local/etc 下面。

相關資料

關聯軟體

參考資料

http://wiki.snese.net/software/o-u software:o-u [snese's notebook], 2007/06/15 00:31 ()
[...] portscout [...]
 
 
software/portscout.txt · 上一次變更: 2007/05/11 00:31 來自 snese